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

traceback out of the box #577

Open
glyph opened this issue Nov 29, 2023 · 1 comment
Open

traceback out of the box #577

glyph opened this issue Nov 29, 2023 · 1 comment

Comments

@glyph
Copy link

glyph commented Nov 29, 2023

  1. pipx install mario
  2. mario eval '"hello"'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/trio/_core/_multierror.py", line 413, in trio_excepthook
    for chunk in traceback.format_exception(etype, value, tb):
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/traceback.py", line 139, in format_exception
    te = TracebackException(type(value), value, tb, limit=limit, compact=True)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: traceback_exception_init() got an unexpected keyword argument 'compact'

Original exception was:
Traceback (most recent call last):
  File "/Users/glyph/.local/bin/mario", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/click/core.py", line 1164, in invoke
    return _process_result(rv)
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/click/core.py", line 1101, in _process_result
    value = ctx.invoke(self.result_callback, value,
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/mario/cli.py", line 161, in cli_main
    app.main(pairs, **kwargs)
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/mario/app.py", line 113, in main
    trio.run(functools.partial(async_main, pairs, **kwargs))
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/trio/_core/_run.py", line 1444, in run
    raise runner.main_task_outcome.error
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/mario/app.py", line 105, in async_main
    stack, items = await program_runner(traversals, items, global_context)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/mario/app.py", line 54, in program_runner
    items = await call_traversal(context, traversal, items, stack)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/mario/app.py", line 31, in call_traversal
    calculated_params = traversal.plugin_object.calculate_more_params(traversal)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/mario/plugins/basic.py", line 245, in <lambda>
    calculate_more_params=lambda x: calculate_function(
                                    ^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/mario/plugins/basic.py", line 38, in calculate_function
    "function": interpret.build_function(
                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/mario/interpret.py", line 143, in build_function
    name_to_module = build_name_to_module(code)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/mario/interpret.py", line 134, in build_name_to_module
    components = split_pipestring(code)
                 ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/mario/interpret.py", line 88, in split_pipestring
    tree = parso.parse(s)
           ^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/parso/__init__.py", line 57, in parse
    grammar = load_grammar(version=version)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/parso/grammar.py", line 256, in load_grammar
    return load_grammar(**kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/parso/grammar.py", line 232, in load_grammar
    version_info = parse_version_string(version)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/parso/utils.py", line 175, in parse_version_string
    return _parse_version(version)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/glyph/.local/pipx/venvs/mario/lib/python3.11/site-packages/parso/utils.py", line 124, in _parse_version
    raise ValueError('The given version is not in the right format. '
ValueError: The given version is not in the right format. Use something like "3.2" or "3".
@schragge
Copy link

schragge commented May 4, 2024

I managed to make it work. BUT... I didn't install it via pip. The latest version on PyPI is 0.0.154, while the latest tag here on GitHub is 0.0.155, and there are significant differences between them. E.g., a companion mario-addons refuses to work with 0.0.154, but works with 0.0.155.

I didn't run Mario inside a venv. Instead, I patched it and prepared a deb for vanilla Debian 12. Had to do it twice, first against 0.0.154, then discovered that addons don't work with it and that GitHub has a more recent code, and did it once again.

Here my patches against 0.0.155:
mario-patches.tar.gz

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

No branches or pull requests

2 participants