-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2.1.1 fails to import on Python 3.8 #2061
Labels
Comments
This is aware and already fixed in dev branch.
________________________________
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: ***@***.***>
|
i switch to use unicorn==2.1.0 on python3.8🤦 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: