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

raise CachewException(f"{tp}: doesn't look like a supported type to cache #400

Open
terxw opened this issue Jul 9, 2023 · 1 comment
Open
Labels
backend Related to indexing/serving bug Something isn't working

Comments

@terxw
Copy link

terxw commented Jul 9, 2023

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.

@karlicoss karlicoss added bug Something isn't working backend Related to indexing/serving labels Jul 15, 2023
@terxw
Copy link
Author

terxw commented Jul 22, 2023

I tried to use older version

pip3 install --force-reinstall -v --user promnesia==1.1.20230129

and its working without this error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Related to indexing/serving bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants