Open willjschmitt opened 7 months ago
This should be a pretty easy fix by adding an additional import importlib.util
to the top of system.py
, which I'll prepare as a PR shortly
Thanks for reporting! Working on it!
This is probably a bug with Python 3.10. I'm using Python 3.11.6, and
>>> import importlib
>>> importlib.util
<module 'importlib.util' (frozen)>
I'm happy to make the change, and in the meantime, you can try Python 3.11
Describe the bug It looks like it was a bug that one could import
import importlib
directly andimportlib.util
was exported as a part of it directly. In Python 3.10, this behavior was changed, which causes anAttributeError
on the second loading of the pycode from a customuser_pycode_path
:See https://discuss.python.org/t/python3-11-importlib-no-longer-exposes-util/25641/7 for more context
To Reproduce Steps to reproduce the behavior: Assuming
andes_pycode_path_bug.py
:Then run the following reproduction steps assuming bash:
Doing the same thing assuming
python=3.8
does not fail and successfully loads. It looks like a python patch version in 3.9 is the version that this breaks on, but I did not find the specific patch it broke on.Expected behavior I'd expect the pycode from the user-specified path to load successfully on all subsequent loads.
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
andes
)**pip packages (please paste the output from
pip list
)Additional context Add any other context about the problem here.