Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

AttributeError: module 'collections' has no attribute 'MutableMapping' #17

Copy link
Copy link
@pedro-acunha

Description

@pedro-acunha
Issue body actions

While executing the UnitTests.py file, the following error is given while using python 3.10:
AttributeError: module 'collections' has no attribute 'MutableMapping'

This is called due to a conflict in the new version of python where attribute MutableMapping is no longer in the module collections. It was moved to collections.abc.MutableMapping.

To work arround this issue, the compatibility.py file in ~/.local/lib/python3.10/site-packages/unittest2 should be edit as in here:

import collections 
if sys.version_info.major == 3 and sys.version_info.minor >= 10:
    from collections.abc import MutableMapping
else: 
    from collections import MutableMapping

Additionally, the class where "collections.MutableMapping" is called should be replace by "MutableMapping".

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.