Skip to content

Traceback on unknown language #80

@spacehobo

Description

@spacehobo

Entangled can't seem to work out how to annotate AWK. I was hoping the "Custom syntax" link in the web site would help me add a rule to tell it to behave like a shell script, but that section appears to be missing from the page now.

This occurs with Entangled 2.3.2 (I tried both the entangled-cli and entangled_cli packages via uv pip in a venv).

[11:47:04] WARNING  `expense.md:31`: language `awk` unknown.
           ERROR   
           ERROR    This error is due to an internal bug in Entangled.
                    Please file an issue including the above stack
                    trace and example content to reproduce the
                    exception at
                    https://github.com/entangled/entangled.py/.
Traceback (most recent call last):
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/entangled/main.py", line 34, in cli
    _ = argh.dispatch(parser)
        ^^^^^^^^^^^^^^^^^^^^^
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/argh/dispatching.py", line 179, in dispatch
    return run_endpoint_function(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/argh/dispatching.py", line 237, in run_endpoint_function
    return _process_command_output(lines, output_file, raw_output)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/argh/dispatching.py", line 254, in _process_command_output
    for line in lines:
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/argh/dispatching.py", line 362, in _execute_command
    for line in result:
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/argh/dispatching.py", line 342, in _call
    result = function(*positional, **keywords)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/entangled/commands/tangle.py", line 61, in tangle
    result, deps = tangle_ref(refs, tgt, annotation_method)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/entangled/tangle.py", line 148, in tangle_ref
    t = tangler(refs, ref, init, v)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 7, in __init__
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/entangled/tangle.py", line 88, in __post_init__
    assert self.cb.language
           ^^^^^^^^^^^^^^^^
AssertionError
Traceback (most recent call last):
  File "/home/nick/src/stitched-expenses/.venv/bin/entangled", line 10, in <module>
    sys.exit(cli())
             ^^^^^
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/entangled/main.py", line 50, in cli
    raise e
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/entangled/main.py", line 34, in cli
    _ = argh.dispatch(parser)
        ^^^^^^^^^^^^^^^^^^^^^
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/argh/dispatching.py", line 179, in dispatch
    return run_endpoint_function(
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/argh/dispatching.py", line 237, in run_endpoint_function
    return _process_command_output(lines, output_file, raw_output)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/argh/dispatching.py", line 254, in _process_command_output
    for line in lines:
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/argh/dispatching.py", line 362, in _execute_command
    for line in result:
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/argh/dispatching.py", line 342, in _call
    result = function(*positional, **keywords)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/entangled/commands/tangle.py", line 61, in tangle
    result, deps = tangle_ref(refs, tgt, annotation_method)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/entangled/tangle.py", line 148, in tangle_ref
    t = tangler(refs, ref, init, v)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 7, in __init__
  File "/home/nick/src/stitched-expenses/.venv/lib/python3.12/site-packages/entangled/tangle.py", line 88, in __post_init__
    assert self.cb.language
           ^^^^^^^^^^^^^^^^
AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions