iranathan / robloxapi

A python module for using the roblox api
MIT License
33 stars 13 forks source link

line 1 column 1 Issue #13

Closed michaelr278 closed 5 years ago

michaelr278 commented 5 years ago

There is a issue with the sendTrade()

This is what I use:

import robloxapi;
cookie = 'MY COOKIE'
rbx = robloxapi.client(cookie)

rbx.Trade.sendTrade(345467478,['55224802'],['1365767'])

Error:


    return json.loads(r)
  File "C:\python\lib\json\__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "C:\python\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\python\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)```
iranathan commented 5 years ago

im pretty sure this is a error with the data i am sending to roblox i will look into it

Jaguar-515 commented 5 years ago

Any update on this situation? @iranathan

sbhadr commented 5 years ago

I've added pull-request as a way around that + a flag if you want to immediately abort. Should remedy the issue. I wasn't able to reproduce this particular error on my side, however, the error is the result of response when it doesn't send a JSON. Since it's trying to load response as a JSON that's not valid, it errors.