Skip to content
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

AttributeError: module 'importlib.resources' has no attribute 'files' #70

Open
multigcs opened this issue Jun 26, 2023 · 3 comments
Open

Comments

@multigcs
Copy link

gowin_pack -d GW1N-9C -o rio.fs rio_pnr.json
Traceback (most recent call last):
File "/opt/oss-cad-suite/libexec/gowin_pack", line 33, in
sys.exit(load_entry_point('Apycula==0.8.2a1', 'console_scripts', 'gowin_pack')())
File "/opt/oss-cad-suite/lib/python3.8/site-packages/Apycula-0.8.2a1-py3.8.egg/apycula/gowin_pack.py", line 984, in main
AttributeError: module 'importlib.resources' has no attribute 'files'
make: *** [Makefile:16: rio.fs] Error 1

@joyaledu
Copy link

joyaledu commented Jul 3, 2023

Observing the same issue on Windows as well, AttributeError: module 'importlib.resources' has no attribute 'files'

@multigcs
Copy link
Author

multigcs commented Jul 3, 2023

file: lib/python3.8/site-packages/Apycula-0.8.2a2.dev1+g8e31050-py3.8.egg/apycula/gowin_pack.py

need to changes:
from:
import importlib.resources
...
importlib.resources.files("apycula").joinpath(f"{device}.pickle"), 'rb') as f:

to:
from importlib_resources import files
....
files("apycula").joinpath(f"{device}.pickle"), 'rb') as f:

@multigcs
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants