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

Bugs - HTTP 404 (for User ID and personal folder) / JSON Decoder error (Expecting value: line 1 colum 1 (char 0) #54

Open
PeterBetlem opened this issue May 25, 2022 · 2 comments

Comments

@PeterBetlem
Copy link

Hi,

Good job on putting this plugin together - definitely something useful :).

I tried running it, but run into two errors:

  • Firstly, I am unable to connect to Zotero with a personal API key + group id + group folder id. A Python error is raised stating the following:
File "C:\OSGeo4W\apps\Python39\lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\OSGeo4W\apps\Python39\lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\OSGeo4W\apps\Python39\lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  • Secondly, I manage to load the library when I use a personal API key + user id + user folder id, but am unable to save points back to Zotero:
Traceback (most recent call last):
File "C:\Users/Peter/AppData/Roaming/QGIS/QGIS3\profiles\peter/python/plugins\LiteratureMapper\literature_mapper.py", line 246, in saveZotero
  item_json = json.load(urllib.request.urlopen(request_url))
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 214, in urlopen
  return opener.open(url, data, timeout)
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 523, in open
  response = meth(req, response)
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 632, in http_response
  response = self.parent.error(
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 561, in error
  return self._call_chain(*args)
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 494, in _call_chain
  result = func(*args)
File "C:\OSGeo4W\apps\Python39\lib\urllib\request.py", line 641, in http_error_default
  raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

Running QGIS 3.22.2 with plugin version 0.3.2

@MicheleTobias
Copy link
Owner

Is the collection you're trying to connect to public? Literature Mapper doesn't yet work with private collections.

@PeterBetlem
Copy link
Author

Yes, I tried it with public (closed) and public (open) and got the same json error in both cases.

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