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

Validation error with keywords #390

Closed
1 task done
kesara opened this issue Dec 27, 2023 · 9 comments
Closed
1 task done

Validation error with keywords #390

kesara opened this issue Dec 27, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@kesara
Copy link
Member

kesara commented Dec 27, 2023

Describe the issue

Recent changes introduce errors with keywords.
For example RFC 9000:

Could not export this item, the error was: Source data for item RFC 9000 (IETF) didn’t validate (err: 11 validation errors for BibliographicItem keyword -> 0 instance of KeywordType, tuple or dict expected (type=type_error.dataclass; class_name=KeywordType) keyword -> 1 instance of KeywordType, tuple or dict expected (type=type_error.dataclass; class_name=KeywordType) keyword -> 2 instance of KeywordType, tuple or dict expected (type=type_error.dataclass; class_name=KeywordType) keyword -> 3 instance of KeywordType, tuple or dict expected (type=type_error.dataclass; class_name=KeywordType) keyword -> 4 instance of KeywordType, tuple or dict expected (type=type_error.dataclass; class_name=KeywordType) keyword -> 5 instance of KeywordType, tuple or dict expected (type=type_error.dataclass; class_name=KeywordType) keyword -> 6 instance of KeywordType, tuple or dict expected (type=type_error.dataclass; class_name=KeywordType) keyword -> 7 instance of KeywordType, tuple or dict expected (type=type_error.dataclass; class_name=KeywordType) keyword -> 8 instance of KeywordType, tuple or dict expected (type=type_error.dataclass; class_name=KeywordType) keyword -> 9 instance of KeywordType, tuple or dict expected (type=type_error.dataclass; class_name=KeywordType) keyword KeywordType.__init__() takes from 1 to 2 positional arguments but 11 were given (type=type_error))

Code of Conduct

@kesara kesara added the bug Something isn't working label Dec 27, 2023
@kesara
Copy link
Member Author

kesara commented Dec 27, 2023

I've rolled back bibxml.ietf.org to v2023.11.3_1.

@kesara
Copy link
Member Author

kesara commented Dec 27, 2023

@stefanomunarini I think keyword changes in #348 are causing this issue.

@kesara kesara changed the title Validation error with keywoards Validation error with keywords Dec 27, 2023
@stefanomunarini
Copy link
Contributor

Hi @kesara , did this issue arise after re indexation of the sources? I am trying to understand how to replicate the issue on my local machine, but seem unable to do so. Thanks

@kesara
Copy link
Member Author

kesara commented Jan 3, 2024

@stefanomunarini I think this was before the reindexing. And rolling back the change fixed the issue without having to reindex.

@stefanomunarini
Copy link
Contributor

stefanomunarini commented Jan 3, 2024

I think this is the issue @kesara , source data needs to be reindexed for that code to work. Let me confirm this, I am testing to see if I can replicate the issue.

In case, is there a day/time that this update could be released with the least disruption? Indexation of sources takes some time (not sure how long it does in production, as I do not have access to the management GUI, but on my local machine is about 1 hour for all the sources)

@stefanomunarini
Copy link
Contributor

I can confirm I was able to replicate the issue rolling back to an old commit. Rebuilding the service with the upgraded relaton-py and re indexing the sources fixed the issue.

Please note: It might take a few minutes for the changes to appear in the GUI after reindexing due to caching.

@kesara
Copy link
Member Author

kesara commented Jan 3, 2024

@stefanomunarini Thanks for looking at it. Should I wait for #393?

@stefanomunarini
Copy link
Contributor

Hi @kesara . No #393 should also be merged after upgrading relaton version (it simply list the keywords values, instead of a dictionary of the format {"content": "value"}) in the citation details page.

@kesara
Copy link
Member Author

kesara commented Jan 4, 2024

Fixed with the reindexing.

@kesara kesara closed this as completed Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants