gautamkrishnar / socli

Stack overflow command line client. Search and browse stack overflow without leaving the terminal :computer:
https://pypi.python.org/pypi/socli
BSD 3-Clause "New" or "Revised" License
1.1k stars 218 forks source link

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

Open Sanix-Darker opened 2 years ago

Sanix-Darker commented 2 years ago

๐Ÿ› 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 tornado@5.1, 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[bot] commented 2 years ago

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!