Script update-metrics using service wos-person throws org.json.JSONException · Issue #509 · 4Science/DSpace · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the script update-metrics using the service wos-person throws the next error:
2025-04-12 17:18:28.675 INFO update-metrics - 214 @ The script has started
2025-04-12 17:18:28.701 INFO update-metrics - 214 @ Update start
2025-04-12 17:18:30.525 ERROR update-metrics - 214 @ null
2025-04-12 17:18:30.528 ERROR update-metrics - 214 @ org.json.JSONException: JSONObject["silo_tc"] is not a JSONObject (class org.json.JSONArray).
at org.json.JSONObject.wrongValueFormatException(JSONObject.java:2906)
at org.json.JSONObject.getJSONObject(JSONObject.java:782)
at org.dspace.metrics.wos.WOSPersonRestConnector.sumMetricCounts(WOSPersonRestConnector.java:114)
at org.dspace.metrics.wos.WOSPersonRestConnector.sendRequestToWOS(WOSPersonRestConnector.java:94)
at org.dspace.metrics.wos.UpdateWOSPersonMetrics.updateMetric(UpdateWOSPersonMetrics.java:49)
at org.dspace.metrics.UpdateCrisMetricsWithExternalSource.performUpdateWithSingleFetches(UpdateCrisMetricsWithExternalSource.java:207)
at org.dspace.metrics.UpdateCrisMetricsWithExternalSource.performUpdate(UpdateCrisMetricsWithExternalSource.java:132)
at org.dspace.metrics.UpdateCrisMetricsWithExternalSource.internalRun(UpdateCrisMetricsWithExternalSource.java:109)
at org.dspace.scripts.DSpaceRunnable.run(DSpaceRunnable.java:162)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
To Reproduce
Steps to reproduce the behavior:
Add person with the metadata person.identifier.orcid of a real person that has cited documents on Web Of Science.
Execute the script update-metrics --service wos-person
Expected behavior
Metrics of persons with a ORCID that has cited documents on WoS should be added to the system.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
DSpace-CRIS version: 2024.02.00
Running the script
update-metrics
using the servicewos-person
throws the next error:To Reproduce
Steps to reproduce the behavior:
person.identifier.orcid
of a real person that has cited documents on Web Of Science.update-metrics --service wos-person
Expected behavior
Metrics of persons with a ORCID that has cited documents on WoS should be added to the system.
More info
Seems like there is a problem on line 110 of WOSPersonRestConnector.java
DSpace/dspace-api/src/main/java/org/dspace/metrics/wos/WOSPersonRestConnector.java
Lines 106 to 121 in 11634b1
It tries to read a int value on
local_count
insidesilo_tc
, butsilo_tc
contains a list of JSON object with the format:The text was updated successfully, but these errors were encountered: