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

Python 3.9.3 : "TypeError: Multiple inheritance with NamedTuple is not supported" #224

Closed
yzoug opened this issue May 5, 2021 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@yzoug
Copy link

yzoug commented May 5, 2021

Hello,

I'm using Python 3.9.3 on ArchLinux and launching snscrape is met with the following:

Traceback (most recent call last):
  File "/usr/bin/snscrape", line 8, in <module>
    sys.exit(main())
  File "/usr/lib/python3.9/site-packages/snscrape/cli.py", line 224, in main
    args = parse_args()
  File "/usr/lib/python3.9/site-packages/snscrape/cli.py", line 159, in parse_args
    import snscrape.modules
  File "/usr/lib/python3.9/site-packages/snscrape/modules/__init__.py", line 15, in <module>
    _import_modules()
  File "/usr/lib/python3.9/site-packages/snscrape/modules/__init__.py", line 12, in _import_modules
    module = importlib.import_module(moduleName)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/usr/lib/python3.9/site-packages/snscrape/modules/telegram.py", line 12, in <module>
    class TelegramPost(typing.NamedTuple, snscrape.base.Item):
  File "/usr/lib/python3.9/typing.py", line 1881, in _namedtuple_mro_entries
    raise TypeError("Multiple inheritance with NamedTuple is not supported")
TypeError: Multiple inheritance with NamedTuple is not supported

Adding the "-vv" and "--dump-locals" switches does not change this output. By searching the web it seems this is an issue with modules not supporting python 3.9, can you confirm ? Any quick workaround, or is my only option a venv on python 3.8 ?

Thanks a lot !

@JustAnotherArchivist
Copy link
Owner

Duplicate of #111

This is fixed in the development version. The release 0.3.4 does indeed not support Python 3.9. I hope to find some time soon to finish a few loose ends and release a new version. Until then, you can either use the dev version or the release with Python 3.6 to 3.8.

@firefling-SenapatiRajesh

This is unfair

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants