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

JSONDecodeError on EPUB Downloads #80

Closed
MerlinB opened this issue May 15, 2018 · 1 comment
Closed

JSONDecodeError on EPUB Downloads #80

MerlinB opened this issue May 15, 2018 · 1 comment

Comments

@MerlinB
Copy link
Contributor

MerlinB commented May 15, 2018

General

Platform: Linux
Python version: 3.6.5
Pyzotero version: 1.3.1

Problem description

I get an JSONDecodeError when using Zotero.file(). Curiously, this only seems to happen with epub files, pdf and mobi work fine.

Traceback (most recent call last):
  File "/home/merlin/Documents/scholarium.at/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/home/merlin/Documents/scholarium.at/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/home/merlin/Documents/scholarium.at/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 187, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/merlin/Documents/scholarium.at/venv/lib/python3.6/site-packages/django/core/handlers/base.py", line 185, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/merlin/Documents/scholarium.at/Produkte/views.py", line 343, in medien_runterladen
    medium = zot.file(getattr(obj, art))
  File "/home/merlin/Documents/scholarium.at/venv/lib/python3.6/site-packages/pyzotero/zotero.py", line 192, in wrapped_f
    return retrieved.json()
  File "/home/merlin/Documents/scholarium.at/venv/lib/python3.6/site-packages/requests/models.py", line 892, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib64/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/lib64/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib64/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
@urschrei
Copy link
Owner

Oops. Fixed in 1.3.2, released on PyPI.

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