running into this weird aipl-breaking bug, which I am not getting in my main aipl dev folder but is only happening when I clone the repo and install it in a new environment:
rowan@seshat test % python3 -V
Python 3.11.3
rowan@seshat test % git clone https://github.com/saulpw/aipl
<snip>
rowan@seshat test % python3 -m venv venv-aipl-test
rowan@seshat test % source venv-aipl-test/bin/activate
(venv-aipl-test) rowan@seshat test % python3 -m pip install ./aipl
<snip>
(venv-aipl-test) rowan@seshat test % aipl -i
> !format
hi!
<Table [1 _0] <LazyRow row={'_': '...(35 bytes)> -> format (line 1)
┏━━━━━┓
┃ _1 ┃
┡━━━━━┩
│ hi! │
└─────┘
> !llm
<Table [1 _1] <LazyRow row={'_': '...(38 bytes)> -> llm (line 1)
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/aipl/repl.py", line 46, in repl
rich.print(inputs[-1])
File "/opt/homebrew/lib/python3.11/site-packages/rich/__init__.py", line 74, in print
return write_console.print(*objects, sep=sep, end=end)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/rich/console.py", line 1699, in print
extend(render(renderable, render_options))
File "/opt/homebrew/lib/python3.11/site-packages/rich/console.py", line 1311, in render
render_iterable = renderable.__rich_console__(self, _options) # type: ignore[union-attr]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/aipl/ops/debug.py", line 72, in _rich_table
cell = str(cell)
^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/aipl/__init__.py", line 12, in __str__
return f'AIPL Error (line {self.linenum} !{self.opname}): {self.exception}'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/aipl/__init__.py", line 25, in __str__
return f'{self.args[1]}: {self.args[0]}'
~~~~~~~~~^^^
IndexError: tuple index out of range
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/homebrew/bin/aipl", line 8, in <module>
sys.exit(main())
^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/aipl/main.py", line 90, in main
repl(aipl, inputs)
File "/opt/homebrew/lib/python3.11/site-packages/aipl/repl.py", line 50, in repl
traceback.print_exc()
^^^^^^^^^
NameError: name 'traceback' is not defined
(venv-aipl-test) rowan@seshat test %
I get the same thing with those commands in a file, although I have to add a command after !llm
that tries to do something with what it outputs.