Skip to content

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

Open
@Sanix-Darker

Description

🐛 Bug Report

Some issues with recent python versions (py3.10.x)

socli java null pointer

THE ERROR

Traceback (most recent call last):
  File "/home/dk/.local/bin/socli", line 5, in <module>
    from socli.sentry import main
  File "/home/dk/.local/lib/python3.10/site-packages/socli/sentry.py", line 5, in <module>
    sentry_sdk.init(
  File "/home/dk/.local/lib/python3.10/site-packages/sentry_sdk/hub.py", line 105, in _init
    client = Client(*args, **kwargs)  # type: ignore
  File "/home/dk/.local/lib/python3.10/site-packages/sentry_sdk/client.py", line 89, in __init__
    self._init_impl()
  File "/home/dk/.local/lib/python3.10/site-packages/sentry_sdk/client.py", line 123, in _init_impl
    self.integrations = setup_integrations(
  File "/home/dk/.local/lib/python3.10/site-packages/sentry_sdk/integrations/__init__.py", line 107, in setup_integrations
    for integration_cls in iter_default_integrations(
  File "/home/dk/.local/lib/python3.10/site-packages/sentry_sdk/integrations/__init__.py", line 41, in iter_default_integrations
    yield getattr(import_module(module), cls)
  File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/dk/.local/lib/python3.10/site-packages/sentry_sdk/integrations/tornado.py", line 25, in <module>
    from tornado.web import RequestHandler, HTTPError
  File "/usr/lib/python3/dist-packages/tornado/web.py", line 88, in <module>
    from tornado import httputil
  File "/usr/lib/python3/dist-packages/tornado/httputil.py", line 107, in <module>
    class HTTPHeaders(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'

MY 'weird' FIX

Probably related to tornado, i fixed it by manually upgrading tornado to 6.1, since sentry_sdk is stuck on [email protected], cf: https://github.com/getsentry/sentry-python/blob/master/setup.py#L52

pip install tornado>=6.1

Have you read the Contributing Guidelines on Pull Requests?

y

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions