I am not a proficient coconut user. I tried to install coconut to give it a try on Fedora 39, but coconut seems to crash at the first command, no matter what I type.
OS: Linux (Fedora 39)
Python version: 3.12
Coconut version: v3.0.3
Shell: bash or xonsh
Terminal: kitty or gnome-terminal
Install method: pip or pipx
How to reproduce the issue:
have python 3.12 installed as the default python interpreter
install coconut with either pip or pipx
start the coconut prompt by typing coconut in a shell
type anything (e.g., 1+1) in the prompt
Here is the traceback (user directory replaced with ~):
Traceback (most recent call last):
File "~/.local/pipx/.cache/586ad7c83fd090d/lib64/python3.12/site-packages/coconut/command/command.py", line 476, in handling_exceptions
yield
File "~/.local/pipx/.cache/586ad7c83fd090d/lib64/python3.12/site-packages/coconut/command/command.py", line 398, in execute_args
self.start_prompt()
File "~/.local/pipx/.cache/586ad7c83fd090d/lib64/python3.12/site-packages/coconut/command/command.py", line 769, in start_prompt
compiled = self.handle_input(code)
^^^^^^^^^^^^^^^^^^^^^^^
File "~/.local/pipx/.cache/586ad7c83fd090d/lib64/python3.12/site-packages/coconut/command/command.py", line 785, in handle_input
return self.parse_block(code)
^^^^^^^^^^^^^^^^^^^^^^
File "~/.local/pipx/.cache/586ad7c83fd090d/lib64/python3.12/site-packages/coconut/command/command.py", line 215, in parse_block
return self.comp.parse_block(code, keep_state=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/.local/pipx/.cache/586ad7c83fd090d/lib64/python3.12/site-packages/coconut/compiler/compiler.py", line 4647, in parse_block
return self.parse(inputstring, self.file_parser, {}, {"header": "none", "initial": "none"}, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/.local/pipx/.cache/586ad7c83fd090d/lib64/python3.12/site-packages/coconut/compiler/compiler.py", line 1247, in parse
parsed = parse(parser, pre_procd, inner=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "~/.local/pipx/.cache/586ad7c83fd090d/lib64/python3.12/site-packages/coconut/compiler/util.py", line 445, in parse
result = prep_grammar(grammar).parseString(text)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "cPyparsing.pyx", line 2516, in cPyparsing.ParserElement.parseString
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 4947, in cPyparsing.And.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 4947, in cPyparsing.And.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 4964, in cPyparsing.And.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 4964, in cPyparsing.And.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5825, in cPyparsing.ZeroOrMore.parseImpl
File "cPyparsing.pyx", line 5731, in cPyparsing._MultipleMatch.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5423, in cPyparsing.ParseElementEnhance.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 4947, in cPyparsing.And.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 4947, in cPyparsing.And.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 4947, in cPyparsing.And.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5423, in cPyparsing.ParseElementEnhance.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5027, in cPyparsing.Or.parseImpl
File "cPyparsing.pyx", line 2002, in cPyparsing.ParserElement.tryParse
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 4947, in cPyparsing.And.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 4964, in cPyparsing.And.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5423, in cPyparsing.ParseElementEnhance.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5423, in cPyparsing.ParseElementEnhance.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 4947, in cPyparsing.And.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5423, in cPyparsing.ParseElementEnhance.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5423, in cPyparsing.ParseElementEnhance.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5423, in cPyparsing.ParseElementEnhance.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 4947, in cPyparsing.And.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5192, in cPyparsing.MatchFirst.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5423, in cPyparsing.ParseElementEnhance.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "cPyparsing.pyx", line 5423, in cPyparsing.ParseElementEnhance.parseImpl
File "cPyparsing.pyx", line 2317, in cPyparsing.ParserElement._parseIncremental
File "~/.local/pipx/.cache/586ad7c83fd090d/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 "~/.local/pipx/.cache/586ad7c83fd090d/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
Edit: I could reproduce this issue in docker containers with all python versions from 3.7 to 3.12 (untested below 3.7), so I guess either I am doing something wrong, or there is a problem with coconut v3.0.3.
I am not a proficient coconut user. I tried to install coconut to give it a try on Fedora 39, but coconut seems to crash at the first command, no matter what I type.
OS: Linux (Fedora 39) Python version: 3.12 Coconut version: v3.0.3 Shell: bash or xonsh Terminal: kitty or gnome-terminal Install method: pip or pipx
How to reproduce the issue:
coconut
in a shellHere is the traceback (user directory replaced with
~
):Edit: I could reproduce this issue in docker containers with all python versions from 3.7 to 3.12 (untested below 3.7), so I guess either I am doing something wrong, or there is a problem with coconut v3.0.3.