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

[Bug] AttributeError: module 'collections' has no attribute 'Mapping' #479

Open
werdy77 opened this issue Oct 18, 2023 · 2 comments · May be fixed by #490
Open

[Bug] AttributeError: module 'collections' has no attribute 'Mapping' #479

werdy77 opened this issue Oct 18, 2023 · 2 comments · May be fixed by #490
Labels
bug Something isn't working

Comments

@werdy77
Copy link

werdy77 commented Oct 18, 2023

Describe the bug
Running nut 3.3 on Ubuntu 22.04.1 gives AttributeError message and not working.

$ python3.10 nut_gui.py 
Failed to load config file: conf/nut.conf
Traceback (most recent call last):
  File "nut_gui.py", line 11, in <module>
    import nut
  File "nut/__init__.py", line 24, in <module>
    import Fs
  File "Fs/__init__.py", line 1, in <module>
    from Fs.Xci import Xci
  File "Fs/Xci.py", line 2, in <module>
    from Fs.File import File
  File "Fs/File.py", line 4, in <module>
    from nut import Print
  File "nut/Print.py", line 1, in <module>
    from nut import Status
  File "nut/Status.py", line 4, in <module>
    from nut import Config
  File "nut/Config.py", line 871, in <module>
    load('conf/nut.conf')
  File "nut/Config.py", line 323, in load
    original = dict_merge(original, j)
  File "nut/Config.py", line 48, in dict_merge
    and isinstance(merge_dct[k], collections.Mapping)):
AttributeError: module 'collections' has no attribute 'Mapping'

NUT version (or git hash):

  • Nut: 3.3

Additional context
Solution is to modify nut/Config.py 6. line to

import collections.abc

and 48. line to

				and isinstance(merge_dct[k], collections.abc.Mapping)):
@werdy77 werdy77 added the bug Something isn't working label Oct 18, 2023
@introkun
Copy link
Collaborator

try this #490

@introkun introkun linked a pull request Mar 26, 2024 that will close this issue
@privacy313
Copy link

also getting same error. OPs edits to Config.py will get things launching again but folder scanning appears to be broken by that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants