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

Exception has occurred: ValidationError 1 validation error for PublicSearchDocument Value error, year 0 is out of range [type=value_error, input_value= #166

Open
Tylersuard opened this issue May 16, 2024 · 1 comment

Comments

@Tylersuard
Copy link

Exception has occurred: ValidationError
1 validation error for PublicSearchDocument
Value error, year 0 is out of range [type=value_error, input_value={'guid': 'US-5626587-A', ...tNumberOne': '05626587'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.7/v/value_error
File "C:\Users\tyler\OneDrive\Desktop\App Ideas and Work\AI USPTO\download_all_patents_by_number.py", line 13, in
pat = Patent.objects.get(patent_number)
pydantic_core._pydantic_core.ValidationError: 1 validation error for PublicSearchDocument
Value error, year 0 is out of range [type=value_error, input_value={'guid': 'US-5626587-A', ...tNumberOne': '05626587'}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.7/v/value_error

Here is my code:

for patent_number in patent_numbers:
pat = Patent.objects.get(patent_number)

@parkerhancock
Copy link
Owner

Huh. I need to add a bit of logic to handle unset dates in older patents. I'll add that to my to-do list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants