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 'collections' has no attribute 'MutableMapping' #283

Open
Sanix-Darker opened this issue May 18, 2022 · 1 comment
Labels

Comments

@Sanix-Darker
Copy link

Sanix-Darker commented May 18, 2022

🐛 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

@welcome
Copy link

welcome bot commented May 18, 2022

Hello there!👋 Welcome to the project!🚀⚡

Thank you and congrats🎉 for opening your issue in this project. Please make sure that you follow our Code of Conduct🙌 while interacting with the project. Have a good day!

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

No branches or pull requests

1 participant