-
Notifications
You must be signed in to change notification settings - Fork 121
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
pydantic dist.version is None causes TypeError: expected string or bytes-like object, got 'NoneType' #626
Comments
How did you install Pydantic and where is it located? I'm suspecting you have an old Pydantic |
Both with
I attempted a Removed all those but still the same issue. |
You should look at locations on your |
Only thing containing the name
I didn't think those findings were worth mentioning, but could they be relevant? In case my bash sucks (list taken from sys.path): #!/bin/bash
find /usr/lib/python311.zip -iname '*pydantic*'
find /usr/lib/python3.11 -iname '*pydantic*'
find /usr/lib/python3.11/lib-dynload -iname '*pydantic*'
find /home/anton/.local/lib/python3.11/site-packages -iname '*pydantic*'
find /usr/lib/python3.11/site-packages -iname '*pydantic*' |
Are these your |
Those were my
While installed it's:
|
And |
Are you certain this is still Pydantic having a |
Glad you asked, now it's Thanks for the assistance! Is there anything that could be done to improve Not sure how I even ended up in this state, probably mixing |
I think it'd be best to address this in In the meantime, build should handle |
Both routes sounds ideal to me. I'll also subscribe to your ticket, it seems quite related. |
This might be an issue in my environment, and it might belong in
packaging
but throwing out a question/bug report here just in case as I drew a judgement call that it'sbuild
supplyingpackaging
with information in a potentially wrong way. And just to note if it matters, I'm managing packages via my operating system.When I manually build
pymilter
I get the following error:(The source of build is modified by adding one print just to see what package and/or version was causing the hiccup)
Here,
dist.version
becomesNone
for pydantic specifically in this case:build/src/build/__init__.py
Lines 173 to 179 in cd06da2
It feels either like a bug in
pydantic
not presenting the version in the right way, orbuild
for passing in unexpected data topackaging
orpackaging
not handling the case. But what if anything is wrong with my environment? And how to debug/correct this, as I most likely have more packages down the line that will produce the same issue.Steps to potentially reproduce:
My environment:
The text was updated successfully, but these errors were encountered: