Importing treetrace (directly or via importing interlab) on Python 3.12.3 (Ubuntu 24.04) raises the following error.
Interlab version is interlab 0.4.1, installed via poetry in a virtual environment.
Importing interlab and treetrace work fine in Python 3.10.14 and Python 3.11.9.
Python 3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import treetrace
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/gavento/proj/ai-ai-bias/.venv/lib/python3.12/site-packages/treetrace/__init__.py", line 12, in <module>
from .ui.console_server import ConsoleServer
File "/home/gavento/proj/ai-ai-bias/.venv/lib/python3.12/site-packages/treetrace/ui/console_server.py", line 13, in <module>
from .server_handle import PATH_TO_STATIC_FILES, ServerHandle
File "/home/gavento/proj/ai-ai-bias/.venv/lib/python3.12/site-packages/treetrace/ui/server_handle.py", line 8, in <module>
from .staticfiles import PATH_TO_STATIC_FILES
File "/home/gavento/proj/ai-ai-bias/.venv/lib/python3.12/site-packages/treetrace/ui/staticfiles.py", line 6, in <module>
with resources.path(browser, ".") as static_path:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/resources/_legacy.py", line 25, in wrapper
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/resources/_legacy.py", line 120, in path
return _common.as_file(_common.files(package) / normalize_path(resource))
~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
File "/usr/lib/python3.12/importlib/resources/abc.py", line 133, in __truediv__
return self.joinpath(child)
^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/resources/readers.py", line 92, in joinpath
return super().joinpath(*descendants)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/importlib/resources/abc.py", line 117, in joinpath
target = next(names)
^^^^^^^^^^^
StopIteration
>>>
Importing
treetrace
(directly or via importinginterlab
) on Python 3.12.3 (Ubuntu 24.04) raises the following error. Interlab version isinterlab 0.4.1
, installed via poetry in a virtual environment. Importing interlab and treetrace work fine in Python 3.10.14 and Python 3.11.9.