socode icon indicating copy to clipboard operation
socode copied to clipboard

Error in zgohr() (and subsequently in kisom())

Open havanagrawal opened this issue 7 years ago • 0 comments

Traceback (most recent call last):
  File "socode.py", line 1952, in <module>
    kisom()
  File "socode.py", line 645, in new_f
    ret_val = f(*args, **kwargs)
  File "socode.py", line 536, in kisom
    zgohr(geoip['city'])
  File "socode.py", line 645, in new_f
    ret_val = f(*args, **kwargs)
  File "socode.py", line 526, in zgohr
    '/data/2.1/find/name?q=%s' % city).content)
  File "C:\Users\Havan\Anaconda2\lib\json\__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "C:\Users\Havan\Anaconda2\lib\json\decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Users\Havan\Anaconda2\lib\json\decoder.py", line 382, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded

The underlying issue is in zgohr(), probably because the http://api.openweathermap.org API requires an API key, which has not been provided in the URL request.

havanagrawal avatar Sep 11 '16 16:09 havanagrawal