Skip to content

Python versions below 3.10 not supported #146

Closed
@ADarkDividedGem

Description

I am using Python 3.9.13 and ran into the following error when I run auto-archiver --help

auto-archiver --help
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 197, in run_module_as_main
return run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.3568.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Dave\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts\auto-archiver.exe_main
.py", line 4, in
from auto_archiver.main import main
File "C:\Users\Dave\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\auto_archiver_init
.py", line 1, in
from . import archivers, databases, enrichers, feeders, formatters, storages, utils, core
File "C:\Users\Dave\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\auto_archiver\archivers_init.py", line 3, in
from .twitter_archiver import TwitterArchiver
File "C:\Users\Dave\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\auto_archiver\archivers\twitter_archiver.py", line 15, in
class TwitterArchiver(Archiver):
File "C:\Users\Dave\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\auto_archiver\archivers\twitter_archiver.py", line 65, in TwitterArchiver
def download_snscrape(self, item: Metadata, url: str, tweet_id: str) -> Union[Metadata|bool]:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

This happens because union types are only support in Python 3.10:
https://peps.python.org/pep-0604/

To get round the issue I added from __future__ import annotations to the top of the twitter_archiver.py file.
fastapi/typer#371 (comment)

Given your readme asks that "python 3.8 or higher" is installed I thought I would report this bug.

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions