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

Abstract retrival JSONDecodeError #18

Closed
ldbolanos opened this issue Dec 11, 2018 · 1 comment
Closed

Abstract retrival JSONDecodeError #18

ldbolanos opened this issue Dec 11, 2018 · 1 comment

Comments

@ldbolanos
Copy link

First of all, thank you!

I am trying to run the notebook with the examples, but retrieve_abstract() keeps always throwing this error. This is the traceback:

JSONDecodeError Traceback (most recent call last)
in ()
----> 1 pub_info = scopus.retrieve_abstract('84905286162')

~\AppData\Local\Continuum\anaconda3\lib\site-packages\pyscopus\scopus.py in retrieve_abstract(self, scopus_id)
163 r = requests.get('%s/%s'%(APIURI.ABSTRACT, scopus_id), params=par)
164
--> 165 js = r.json()
166
167 try:

~\AppData\Local\Continuum\anaconda3\lib\site-packages\requests\models.py in json(self, **kwargs)
894 # used.
895 pass
--> 896 return complexjson.loads(self.text, **kwargs)
897
898 @Property

~\AppData\Local\Continuum\anaconda3\lib\json_init_.py in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
346 parse_int is None and parse_float is None and
347 parse_constant is None and object_pairs_hook is None and not kw):
--> 348 return _default_decoder.decode(s)
349 if cls is None:
350 cls = JSONDecoder

~\AppData\Local\Continuum\anaconda3\lib\json\decoder.py in decode(self, s, _w)
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()
339 if end != len(s):

~\AppData\Local\Continuum\anaconda3\lib\json\decoder.py in raw_decode(self, s, idx)
353 obj, end = self.scan_once(s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

I don't know how to solve it.

Kind regards,
Luis

@zhiyzuo
Copy link
Owner

zhiyzuo commented Jan 26, 2019

Unfortunately I am unable to reproduce this error. So everything else works but only abstract retrieval gives you error? Did you try a different api key?

@zhiyzuo zhiyzuo closed this as completed May 24, 2020
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