1. Erik Svensson
  2. transmissionrpc
Issue #68 open

No JSON object could be decoded

Anonymous created an issue

transmissionrpc.Client('http://nas4free.dyndns.org:9091') No handlers could be found for logger "transmissionrpc"


ValueError Traceback (most recent call last) /home/jonathan/<ipython-input-2-38cc0903b9db> in <module>() ----> 1 transmissionrpc.Client('http://fnas4free.dyndns.org:9091')

/usr/local/lib/python2.7/dist-packages/transmissionrpc-0.11-py2.7.egg/transmissionrpc/client.pyc in init(self, address, port, user, password, http_handler, timeout) 167 self.server_version = None 168 self.protocol_version = None --> 169 self.get_session() 170 self.torrent_get_arguments = get_arguments('torrent-get' 171 , self.rpc_version)

/usr/local/lib/python2.7/dist-packages/transmissionrpc-0.11-py2.7.egg/transmissionrpc/client.pyc in get_session(self, timeout) 826 Get session parameters. See the Session class for more information. 827 """ --> 828 self._request('session-get', timeout=timeout) 829 self._update_server_version() 830 return self.session

/usr/local/lib/python2.7/dist-packages/transmissionrpc-0.11-py2.7.egg/transmissionrpc/client.pyc in _request(self, method, arguments, ids, require_ids, timeout) 250 251 try: --> 252 data = json.loads(http_data) 253 except ValueError as error: 254 LOGGER.error('Error: ' + str(error))

/usr/lib/python2.7/json/init.pyc in loads(s, encoding, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw) 324 parse_int is None and parse_float is None and 325 parse_constant is None and object_pairs_hook is None and not kw): --> 326 return _default_decoder.decode(s) 327 if cls is None: 328 cls = JSONDecoder

/usr/lib/python2.7/json/decoder.pyc in decode(self, s, _w) 364 365 """ --> 366 obj, end = self.raw_decode(s, idx=_w(s, 0).end()) 367 end = _w(s, end).end() 368 if end != len(s):

/usr/lib/python2.7/json/decoder.pyc in raw_decode(self, s, idx) 382 obj, end = self.scan_once(s, idx) 383 except StopIteration: --> 384 raise ValueError("No JSON object could be decoded") 385 return obj, end

ValueError: No JSON object could be decoded

Comments (3)

  1. Jonathan Legrand

    Sorry I posted it too quickly,

    I get this error but I don't get it. I've pulled the username and password to access it but I get that message too.

    Do you have any idea where that come from? Thanks. Jo

  2. Erik Svensson repo owner

    The response from Transmission contains invalid JSON data. One might try to log the error by adding a stdout logger.

    transmissionrpc.utils.add_stdout_logger()
    

    Then try to report the HTTP response.

  3. Log in to comment