MicheleTobias / LiteratureMapper

A QGIS plugin to add geoJSON geometries to records in a Zotero library
GNU General Public License v2.0
28 stars 7 forks source link

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

Open PeterBetlem opened 2 years ago

PeterBetlem commented 2 years ago

Hi,

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

I tried running it, but run into two errors:

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)
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 commented 2 years ago

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

PeterBetlem commented 2 years ago

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