-
Notifications
You must be signed in to change notification settings - Fork 14
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
TypeError: no implicit conversion of String into Integer #131
Comments
This is really 3 issues:
It looks like line 310 of crossref_reader.rb in bolognese is signalling an exception due to the inability to handle more than one funder_identifier. Ex is: 10.1093/mnras/stab1131 which has an array of funder_identifiers for one funder. Causes dig to signal 'no implicit conversion of string to integer' when trying to get the funder_identifier and so the import fails.
This screengrab shows the metadata in the DB:
Clarification: 3 is related to the overall issue documented here because the failure to import crossref doi metadata allows numerous related requests to be queued but never handled successfully due to the failure of the original request - which was to import doi metadata. LINKS TO CROSSREF METADATA: |
So this is just a case where we've most likely got a slightly different crossref metadata case which is not being handled by bolognese. For 1. I'd need to run the spec to see what values are, but something seems odd as thereis an Array.Wrap around assertion which should cope with the multiple assertions. For 3. This is too big for a single issue and revolves around the architecture of EventData, I'd leave it out of this for now. |
@richardhallett, what do you mean by 'run the spec'? |
As in create a test with rspec against a fake fixture (metadata file) then you can actually do some debugging to find out what values are, even with a simple debug print out to the console. |
This is a work-in-progress. I have committed a fix to the feature branch that will allow the Crossref XML reader to handle multiple funder_identifiers without throwing an exception. Currently it reads through all of the funder_identifiers and uses the last value. For multiple funder_identifiers, I am not sure what the final representation (in the DB) should be and what the writers find acceptable so that any translation to other metadata schemas are correct. Same problem with award numbers. There can be multiple award numbers, but we only use the last one. |
Still a work-in-progress. I discovered a couple more issues with funder information.
There are 2 tests that are included in spec/readers/crossref_reader_spec.rb that test dois which have these issues (at lines 107 and 196). See 'Zhejiang Innovation Team Grant' in the Crossref XML for 10.3390/ijms23084442. (multiple award numbers with funder identifier) |
Sentry Issue: LUPO-1KW
The text was updated successfully, but these errors were encountered: