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

See original GitHub issue

It looks like a recent change to nmigen dependencies is causing ModuleNotFoundError’s

Traceback (most recent call last):
  File "/home/colepoirier/src/nmigen/nmigen/_yosys.py", line 17, in <module>
    importlib_resources.files # py3.9+ stdlib
AttributeError: module 'importlib.resources' has no attribute 'files'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/colepoirier/src/nmigen/nmigen/_yosys.py", line 19, in <module>
    import importlib_resources # py3.8- shim
ModuleNotFoundError: No module named 'importlib_resources'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "decoder/pseudo/pywriter.py", line 8, in <module>
    from soc.decoder.power_pseudo import convert_to_python
  File "/home/colepoirier/src/soc/src/soc/decoder/power_pseudo.py", line 18, in <module>
    from soc.decoder.power_decoder import create_pdecode
  File "/home/colepoirier/src/soc/src/soc/decoder/power_decoder.py", line 84, in <module>
    from nmigen.cli import rtlil
  File "/home/colepoirier/src/nmigen/nmigen/cli.py", line 4, in <module>
    from .back import rtlil, cxxrtl, verilog, pysim
  File "/home/colepoirier/src/nmigen/nmigen/back/cxxrtl.py", line 1, in <module>
    from .._yosys import *
  File "/home/colepoirier/src/nmigen/nmigen/_yosys.py", line 21, in <module>
    import importlib_resources # py3.6- shim
ModuleNotFoundError: No module named 'importlib_resources'

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
whitequarkcommented, Jun 30, 2020
0reactions
whitequarkcommented, Jun 21, 2020

Sorry I was looked in the docs older of the master branch, now having looked at the same under the ‘doc’ branch things are much clearer.

Yeah the new docs aren’t really finished or properly public yet, it’s understandable you’ll get confused.

Read more comments on GitHub >

github_iconTop Results From Across the Web

module 'importlib.resources' has no attribute 'files' · Issue #1 ...
AttributeError : module 'importlib.resources' has no attribute 'files' #1 ... I think I can fix this with https://importlib-resources.
Read more >
AttributeError: module 'importlib' has no attribute 'util' II
Importing a package doesn't automatically load its submodules. · sounds legit - but that doesn't answer my question - pyqtdeploy will work on...
Read more >
importlib — The implementation of import — Python 3.11.1 ...
importlib.resources provides routines for accessing non-code “resources” from ... The loader should set several attributes on the module (note that some of ...
Read more >
importlib-resources - PyPI
importlib_resources is a backport of Python standard library importlib.resources module for older Pythons. The key goal of this module is to replace parts ......
Read more >
importlib-resources 5.10.2.dev4+gf8c6b66.d20221216 ...
importlib_resources is a library which provides for access to resources in Python packages. It provides functionality similar to pkg_resources ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found