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
While trying to use unicorn 2.1.1 on an Ubuntu 20.04 install which uses Python 3.8, it installs fine but fails to import.
>>> import unicorn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/dist-packages/unicorn/__init__.py", line 4, in <module>
from .unicorn import Uc, ucsubclass, uc_version, uc_arch_supported, version_bind, debug, UcError, __version__
File "/usr/local/lib/python3.8/dist-packages/unicorn/unicorn.py", line 14, in <module>
from .unicorn_py3 import *
File "/usr/local/lib/python3.8/dist-packages/unicorn/unicorn_py3/__init__.py", line 1, in <module>
from .unicorn import *
File "/usr/local/lib/python3.8/dist-packages/unicorn/unicorn_py3/unicorn.py", line 200, in <module>
uclib = __load_uc_lib()
File "/usr/local/lib/python3.8/dist-packages/unicorn/unicorn_py3/unicorn.py", line 99, in __load_uc_lib
resources.files("unicorn") / 'lib'
AttributeError: module 'importlib.resources' has no attribute 'files'
If Python 3.8 is supposed to be still supported (Ubuntu 20.04 is EOL in April 2025, while Python 3.8 was EOL at September 2024 -.-), then 1e04dbf introduced a regression, because importlib.resources.files was added in Python 3.9. The except block would need to catch AttributeErrors too next to ImportError.
The text was updated successfully, but these errors were encountered:
________________________________
From: peace-maker ***@***.***>
Sent: Friday, December 6, 2024 12:09:16 AM
To: unicorn-engine/unicorn ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [unicorn-engine/unicorn] 2.1.1 fails to import on Python 3.8 (Issue #2061)
While trying to use unicorn 2.1.1 on an Ubuntu 20.04 install which uses Python 3.8, it installs fine but fails to import.
>> import unicorn
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.8/dist-packages/unicorn/__init__.py", line 4, in <module>
from .unicorn import Uc, ucsubclass, uc_version, uc_arch_supported, version_bind, debug, UcError, __version__
File "/usr/local/lib/python3.8/dist-packages/unicorn/unicorn.py", line 14, in <module>
from .unicorn_py3 import *
File "/usr/local/lib/python3.8/dist-packages/unicorn/unicorn_py3/__init__.py", line 1, in <module>
from .unicorn import *
File "/usr/local/lib/python3.8/dist-packages/unicorn/unicorn_py3/unicorn.py", line 200, in <module>
uclib = __load_uc_lib()
File "/usr/local/lib/python3.8/dist-packages/unicorn/unicorn_py3/unicorn.py", line 99, in __load_uc_lib
resources.files("unicorn") / 'lib'
AttributeError: module 'importlib.resources' has no attribute 'files'
If Python 3.8 is supposed to be still supported (Ubuntu 20.04 is EOL in April 2025, while Python 3.8 was EOL at September 2024 -.-), then 1e04dbf<1e04dbf> introduced a regression, because importlib.resources.files<https://docs.python.org/3/library/importlib.resources.html#importlib.resources.files> was added in Python 3.9. The except block would need to catch AttributeErrors too next to ImportError.
―
Reply to this email directly, view it on GitHub<#2061>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AHJULO4FH37KFICGZWAJGOT2EB3CZAVCNFSM6AAAAABTCZ2MPOVHI2DSMVQWIX3LMV43ASLTON2WKOZSG4ZDAOBSGQ3DOMI>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
While trying to use unicorn 2.1.1 on an Ubuntu 20.04 install which uses Python 3.8, it installs fine but fails to import.
If Python 3.8 is supposed to be still supported (Ubuntu 20.04 is EOL in April 2025, while Python 3.8 was EOL at September 2024 -.-), then 1e04dbf introduced a regression, because
importlib.resources.files
was added in Python 3.9. The except block would need to catchAttributeError
s too next toImportError
.The text was updated successfully, but these errors were encountered: