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_x64qbz5n2kfra8p0\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_x64qbz5n2kfra8p0\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'
I am using Python 3.9.13 and ran into the following error when I run
auto-archiver --help
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 thetwitter_archiver.py
file. https://github.com/tiangolo/typer/issues/371#issuecomment-1073695552Given your readme asks that "python 3.8 or higher" is installed I thought I would report this bug.