You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Import from imp fail since imp is no longer supported in python 3.12. Generates lots of the the following error(s)
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/unfurl/core.py", line 319, in run_plugins
parser = importlib.import_module(f'unfurl.parsers.{unfurl_parser}')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/usr/local/lib/python3.12/site-packages/unfurl/parsers/parse_mac_addr.py", line 15, in <module>
import maclookup
File "/usr/local/lib/python3.12/site-packages/maclookup/__init__.py", line 5, in <module>
from .api_client import ApiClient
File "/usr/local/lib/python3.12/site-packages/maclookup/api_client.py", line 2, in <module>
from future.standard_library import install_aliases
File "/usr/local/lib/python3.12/site-packages/future/standard_library/__init__.py", line 65, in <module>
import imp
ModuleNotFoundError: No module named 'imp'```
The text was updated successfully, but these errors were encountered:
I believe this is caused by the maclookup package, which looks like it hasn't been updated since 2018(!) and doesn't work well with Python 3.12. I'll look at finding a different way to provide this functionality.
Speaking of maclookup, we ran into issues using the pip install as it didn't include the maclookup requirement. Maybe the requirement.txt should include all modules and then have other files if you want a slim version? Or maybe wrap the import in a Try / Except as an optional component. We're not even using the maclookup afaik, but would get this error.
File "/home/user/.local/lib/python3.12/site-packages/unfurl/parsers/parse_mac_addr.py", line 15, in <module>
import maclookup
ModuleNotFoundError: No module named 'maclookup'
But yeah, replacing it all together may be good idea.
Description
Import from imp fail since imp is no longer supported in python 3.12. Generates lots of the the following error(s)
The text was updated successfully, but these errors were encountered: