Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'frozenset' object has no attribute 'append' #804

Closed
caedmon-kitty opened this issue Nov 23, 2023 · 2 comments · Fixed by #806
Closed

AttributeError: 'frozenset' object has no attribute 'append' #804

caedmon-kitty opened this issue Nov 23, 2023 · 2 comments · Fixed by #806

Comments

@caedmon-kitty
Copy link

caedmon-kitty commented Nov 23, 2023

Just setup a venv and "pip install coconut". Tried one of the examples in the tutorial and got many many lines of error.

~$ source coconut/bin/activate
(coconut) ~$ cd python/coconut/
(coconut) ~$ bin/coconut
Coconut Interpreter v3.0.3 (Python 3.12):
(enter 'exit()' or press Ctrl-D to end)


>>> "hello world"|>print File
"/home/me/coconut/lib64/python3.12/site-packages/coconut/command/command.py", line 476, in handling_exceptions
 yield

...

File "/home/me/coconut/lib64/python3.12/site-packages/coconut/compiler/util.py", line 684, in parseImpl
with self.wrapped_context():
File "/usr/lib64/python3.12/contextlib.py", line 137, in enter
return next(self.gen)
^^^^^^^^^^^^^^
File "/home/me/coconut/lib64/python3.12/site-packages/coconut/compiler/util.py", line 669, in wrapped_context
ParserElement.packrat_context.append(self.wrapper)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'frozenset' object has no attribute 'append'
(you should report this at https://github.com/evhub/coconut/issues/new)
Coconut exiting with error: AttributeError
(coconut) $ which python
/home/me/coconut/bin/python
(coconut) $ python --version
Python 3.12.0

Same thin happens every time so repro is easy. Let me know if you need additional information or the complete traceback.

@evhub evhub added this to the v3.0.4 milestone Nov 23, 2023
@evhub
Copy link
Owner

evhub commented Nov 23, 2023

Yep; I'm well aware of this problem—I'll try to get out a new coconut version that fixes it soon. It has to do with an incompatibility between the current released coconut and the current released cPyparsing, so you can solve the issue by downgrading cPyparsing with:

pip install cPyparsing==2.4.7.2.2.1

@evhub evhub closed this as completed Nov 23, 2023
@caedmon-kitty
Copy link
Author

caedmon-kitty commented Nov 23, 2023

Thank you for the quick response and the solution! Worked perfectly.
I was going through coconut withdrawal! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants