Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Выходит ошибка simplejson.errors.JSONDecodeError, как это исправить? #25

Open
m1rasb opened this issue Feb 16, 2021 · 0 comments

Comments

@m1rasb
Copy link

m1rasb commented Feb 16, 2021

Traceback (most recent call last):
File "C:\Users\MBEATS\AppData\Local\Programs\Python\Python39\lib\site-packages\simplejson\scanner.py", line 37, in _scan_once
nextchar = string[idx]
IndexError: string index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\temp\sale\app.py", line 11, in
print(api.balance.text)
File "C:\Users\MBEATS\AppData\Local\Programs\Python\Python39\lib\site-packages\SimpleQIWI\Session.py", line 80, in balance
balances = self.full_balance
File "C:\Users\MBEATS\AppData\Local\Programs\Python\Python39\lib\site-packages\SimpleQIWI\Session.py", line 70, in full_balance
return self._get_balance()
File "C:\Users\MBEATS\AppData\Local\Programs\Python\Python39\lib\site-packages\SimpleQIWI\Session.py", line 128, in get_balance
json = response.json()
File "C:\Users\MBEATS\AppData\Local\Programs\Python\Python39\lib\site-packages\requests\models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "C:\Users\MBEATS\AppData\Local\Programs\Python\Python39\lib\site-packages\simplejson_init
.py", line 525, in loads
return _default_decoder.decode(s)
File "C:\Users\MBEATS\AppData\Local\Programs\Python\Python39\lib\site-packages\simplejson\decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "C:\Users\MBEATS\AppData\Local\Programs\Python\Python39\lib\site-packages\simplejson\decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
File "C:\Users\MBEATS\AppData\Local\Programs\Python\Python39\lib\site-packages\simplejson\scanner.py", line 79, in scan_once
return _scan_once(string, idx)
File "C:\Users\MBEATS\AppData\Local\Programs\Python\Python39\lib\site-packages\simplejson\scanner.py", line 39, in _scan_once
raise JSONDecodeError(errmsg, string, idx)
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@m1rasb m1rasb changed the title Выходит ошибка, как это исправить? Выходит ошибка simplejson.errors.JSONDecodeError, как это исправить? Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant