promnesia
promnesia copied to clipboard
raise CachewException(f"{tp}: doesn't look like a supported type to cache
After installing latest promnessia
pip3 install -U --user promnesia
Requirement already satisfied: promnesia in ./.local/lib/python3.10/site-packages (1.2.20230515)
I got this error
❯ /home/kangus/.local/bin/promnesia index
[INFO 2023-07-09 13:04:21 promnesia __main__.py:383] CLI args: Namespace(mode='index', config=PosixPath('/home/kangus/.config/promnesia/config.py'), dry=False, sources=None, overwrite=False, intermediate=None)
Traceback (most recent call last):
File "/home/kangus/.local/bin/promnesia", line 8, in <module>
sys.exit(main())
File "/home/kangus/.local/lib/python3.10/site-packages/promnesia/__main__.py", line 391, in main
do_index(
File "/home/kangus/.local/lib/python3.10/site-packages/promnesia/__main__.py", line 106, in do_index
errors = list(_do_index(dry=dry, sources_subset=sources_subset, overwrite_db=overwrite_db))
File "/home/kangus/.local/lib/python3.10/site-packages/promnesia/__main__.py", line 91, in _do_index
dump_errors = visits_to_sqlite(it(), overwrite_db=overwrite_db)
File "/home/kangus/.local/lib/python3.10/site-packages/promnesia/dump.py", line 68, in visits_to_sqlite
binder = NTBinder.make(DbVisit)
File "/usr/local/lib/python3.10/dist-packages/cachew/__init__.py", line 421, in make
fields = tuple(NTBinder.make(tp=ann, name=fname) for fname, ann in annotations.items())
File "/usr/local/lib/python3.10/dist-packages/cachew/__init__.py", line 421, in <genexpr>
fields = tuple(NTBinder.make(tp=ann, name=fname) for fname, ann in annotations.items())
File "/usr/local/lib/python3.10/dist-packages/cachew/__init__.py", line 420, in make
raise CachewException(f"{tp}: doesn't look like a supported type to cache. See https://github.com/karlicoss/cachew#features for the list of supported types.")
cachew.CachewException: ForwardRef('Url'): doesn't look like a supported type to cache. See https://github.com/karlicoss/cachew#features for the list of supported types.
It looks like db format error, i upgraded from 2022 version.
I tried to use older version
pip3 install --force-reinstall -v --user promnesia==1.1.20230129
and its working without this error.