-
Notifications
You must be signed in to change notification settings - Fork 75
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
AttributeError: 'pydantic_core._pydantic_core.Url' object has no attribute 'strip' #438
Comments
I'm getting the same, with fresh install. Any ideas why? |
karlicoss/promnesia#438 ``` AttributeError: 'pydantic_core._pydantic_core.Url' object has no attribute 'strip' ``` is thrown on every page access. this is most likely caused by an API breakage between pydantic 1->2; this commit tricks fastapi into thinking it uses the latest version of pydantic in the nixpkgs (2.6.3 as of this commit) but pins it to 1.10.16
I found this thread after encountering the same issue. This is most likely a result of some dependency tree update involving fastapi, under which it used to use pydantic 1.. but if you update everything to latest, you get 2... This is what I suspected after running tl,dr: downgrade pydantic. I have tested it with 1.10.16 (the latest in the 1.. versions) and the error goes away. FWIW, I run promnesia inside a nix shell; swapping out pydantic within fastapi took a bit of head bashing, so if it helps any other nix users, you can reference my expression here: https://github.com/whacked/setup/blob/f46e7c85bcc2548f2fed831b0f2a20cbb0c7ccc7/nix/pkgs/misc/promnesia/default.nix If you don't use nix you can probably just run |
also for reference, here's my current pipdeptree for my promnesia environment after fixing the error. It might not be minimal, but should be close.
|
Hey everyone, sorry not responded earlier! I never seen the error on CI since or anywhere else -- I also recently had a full reinstall from scratch on my PC, and promnesia is working. Just for the reference, here are the relevant versions I have:
I suspect this is some intermittent issue caused by weird fastapi/pydantic/uvicorn version mismatch -- if people could try again with latest versions ( |
When I run the demo with
promnesia demo https://github.com/karlicoss/exobrain
and then the browser extension tries to access/visits
, I get:The text was updated successfully, but these errors were encountered: