El 26/07/16 a las 16:45, euler escribió:
Hi Àlex and helix84,

I tried to implement the Scopus citations from your gist, but I am
having this error in my Tomcat logs:

Traceback (most recent call last):
  File "C:\DSpace\webapps\jython\ImpactServlet.py", line 36, in doGet
    self.doPost(request, response)
  File "C:\DSpace\webapps\jython\ImpactServlet.py", line 47, in doPost
    response.getWriter().println(impactService.query())
  File "C:\DSpace\webapps\jython\ImpactServlet.py", line 155, in query
    responseData = self._impactService.query()
  File "C:\DSpace\webapps\jython\ImpactServlet.py", line 93, in query
    return self._buildResponseToClient(serviceResponse)
  File "C:\DSpace\webapps\jython\ImpactServlet.py", line 221, in 
_buildResponseToClient
    citationCount = serviceResponseObject["citation-count-response"]\
KeyError: 'citation-count-response'

    org.python.core.Py.KeyError(Py.java:249)
    org.python.core.PyObject.__getitem__(PyObject.java:738)
    
org.python.pycode._pyx2._buildResponseToClient$22(C:\DSpace\webapps\jython\ImpactServlet.py:224)
    
org.python.pycode._pyx2.call_function(C:\DSpace\webapps\jython\ImpactServlet.py)
    org.python.core.PyTableCode.call(PyTableCode.java:167)
    org.python.core.PyBaseCode.call(PyBaseCode.java:153)
    org.python.core.PyFunction.__call__(PyFunction.java:423)
    org.python.core.PyMethod.__call__(PyMethod.java:141)
    
org.python.pycode._pyx2.query$8(C:\DSpace\webapps\jython\ImpactServlet.py:93)
    
org.python.pycode._pyx2.call_function(C:\DSpace\webapps\jython\ImpactServlet.py)
    org.python.core.PyTableCode.call(PyTableCode.java:167)
    org.python.core.PyBaseCode.call(PyBaseCode.java:138)
    org.python.core.PyFunction.__call__(PyFunction.java:413)
    org.python.core.PyMethod.__call__(PyMethod.java:126)
    
org.python.pycode._pyx2.query$14(C:\DSpace\webapps\jython\ImpactServlet.py:164)
    
org.python.pycode._pyx2.call_function(C:\DSpace\webapps\jython\ImpactServlet.py)
    org.python.core.PyTableCode.call(PyTableCode.java:167)
    org.python.core.PyBaseCode.call(PyBaseCode.java:138)
    org.python.core.PyFunction.__call__(PyFunction.java:413)
    org.python.core.PyMethod.__call__(PyMethod.java:126)
    
org.python.pycode._pyx2.doPost$4(C:\DSpace\webapps\jython\ImpactServlet.py:47)
    
org.python.pycode._pyx2.call_function(C:\DSpace\webapps\jython\ImpactServlet.py)
    org.python.core.PyTableCode.call(PyTableCode.java:167)
    org.python.core.PyBaseCode.call(PyBaseCode.java:170)
    org.python.core.PyFunction.__call__(PyFunction.java:434)
    org.python.core.PyMethod.__call__(PyMethod.java:156)
    
org.python.pycode._pyx2.doGet$3(C:\DSpace\webapps\jython\ImpactServlet.py:36)
    
org.python.pycode._pyx2.call_function(C:\DSpace\webapps\jython\ImpactServlet.py)
    org.python.core.PyTableCode.call(PyTableCode.java:167)
    org.python.core.PyBaseCode.call(PyBaseCode.java:307)
    org.python.core.PyBaseCode.call(PyBaseCode.java:198)
    org.python.core.PyFunction.__call__(PyFunction.java:482)
    org.python.core.PyMethod.instancemethod___call__(PyMethod.java:237)
    org.python.core.PyMethod.__call__(PyMethod.java:228)
    org.python.core.PyMethod.__call__(PyMethod.java:218)
    org.python.core.PyMethod.__call__(PyMethod.java:213)
    org.python.core.PyObject._jcallexc(PyObject.java:3626)
    org.python.proxies.__main__$ImpactServlet$6.doGet(Unknown Source)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
    org.python.proxies.__main__$ImpactServlet$6.service(Unknown Source)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
    org.python.util.PyServlet.service(PyServlet.java:155)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)



Can you please comment on what could be the cause of this error and how
to resolve this?

Thanks in advance and best regards,
euler

On Friday, December 18, 2015 at 8:40:01 PM UTC+8, Àlex Magaz Graça wrote:

    El 06/11/15 a las 13:27, helix84 escribió:
    > 1) Register for Thomson's AMR.
    >
    > 2) Follow steps 1-4 from here:
    > https://wiki.duraspace.org/display/DSPACE/Jython+webapp+for+DSpace
    <https://wiki.duraspace.org/display/DSPACE/Jython+webapp+for+DSpace>
    >
    > 3) Copy the attached file into the webapp.
    >
    > 4) Get the data like this:
    > http://example.com/webapp/wok_servlet.py?ut=000361215400001
    <http://example.com/webapp/wok_servlet.py?ut=000361215400001>
    >
    > 5) Use either XSLT or JavaScript to parse the xml response and
    display
    > the data. I recommend the later (XMLHttpRequest).
    >
    >
    > Regards,
    > ~~helix84
    >
    > Compulsory reading: DSpace Mailing List Etiquette
    > https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
    <https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette>
    >
    > --
    > You received this message because you are subscribed to the Google
    > Groups "DSpace Technical Support" group.
    > To unsubscribe from this group and stop receiving emails from it,
    send
    > an email to [email protected] <javascript:>
    > <mailto:[email protected] <javascript:>>.
    > To post to this group, send email to [email protected]
    <javascript:>
    > <mailto:[email protected] <javascript:>>.
    > Visit this group at http://groups.google.com/group/dspace-tech
    <http://groups.google.com/group/dspace-tech>.
    > For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.
    Hi,

    I've made some adaptations to the script and added Scopus citations
    too. In case someone finds it useful, I'm sharing it, along with the
    UI code, in a gist:

    https://gist.github.com/rivaldi8/7a9f2483d5648e570d4c
    <https://gist.github.com/rivaldi8/7a9f2483d5648e570d4c>

    Cheers,
    Àlex

--
You received this message because you are subscribed to the Google
Groups "DSpace Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
To post to this group, send email to [email protected]
<mailto:[email protected]>.
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.
Hi euler,

Sorry for the late response, I've been on holidays.

I also have these errors logged by Tomcat. If apart from these errors, you are 
getting proper citation counts in item pages, don't worry. It's just lack of 
error control. Ideally the code should check no error has been received from 
the server, whether the DOI has been found or not, etc. To keep it simple, I 
decided that if anything failed, the client JavaScript would just skip the 
rendering of the citation count.

Apart from the errors logged, I haven't noticed any problem, so I didn't think 
it worth spending more time on it. Please, let me know If you've had any 
problem caused by it or think it might be problematic.

Cheers,
Àlex

--
You received this message because you are subscribed to the Google Groups "DSpace 
Technical Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/dspace-tech.
For more options, visit https://groups.google.com/d/optout.

Reply via email to