LiteratureMapper icon indicating copy to clipboard operation
LiteratureMapper copied to clipboard

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

Open PeterBetlem opened this issue 2 years ago • 2 comments

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

PeterBetlem avatar May 25 '22 14:05 PeterBetlem

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

MicheleTobias avatar May 25 '22 16:05 MicheleTobias

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

PeterBetlem avatar May 25 '22 21:05 PeterBetlem