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

JSONDecodeError: Invalid control character #2

Open
avp90 opened this issue Aug 23, 2018 · 2 comments
Open

JSONDecodeError: Invalid control character #2

avp90 opened this issue Aug 23, 2018 · 2 comments

Comments

@avp90
Copy link

avp90 commented Aug 23, 2018

I got the following error after sh run-grabber.sh:

Traceback (most recent call last):
  File "./sundtek-grab.py", line 44, in <module>
    data.append(r.json())
  File "/home/pi/.local/lib/python3.5/site-packages/requests/models.py", line 896, in json
    return complexjson.loads(self.text, **kwargs)
  File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.5/json/decoder.py", line 355, in raw_decode
    obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Invalid control character at: line 1 column 10919 (char 10918)

Do you have a idea or should I debug by myself?

@avp90
Copy link
Author

avp90 commented Aug 4, 2019

I can reproduce it sometimes. 😄

Traceback (most recent call last):
  File "D:\GIT\DVBCServer\sundtek-to-xmltv\test.local.py", line 4, in <module>
    __import__('sundtek-grab.py')
  File "D:\GIT\DVBCServer\sundtek-to-xmltv\sundtek-grab.py", line 188, in <module>
    parse_channels_shows(overviews)
  File "D:\GIT\DVBCServer\sundtek-to-xmltv\sundtek-grab.py", line 146, in parse_channels_shows
    shows[event_id] = get_show_data(service_id, event_id, delsys)
  File "D:\GIT\DVBCServer\sundtek-to-xmltv\sundtek-grab.py", line 108, in get_show_data
    data = r.json()
  File "C:\Program Files\Python37\lib\site-packages\requests\models.py", line 897, in json
    return complexjson.loads(self.text, **kwargs)
  File "C:\Program Files\Python37\lib\json\__init__.py", line 348, in loads
    return _default_decoder.decode(s)
  File "C:\Program Files\Python37\lib\json\decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "C:\Program Files\Python37\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)

avp90 added a commit to avp90/sundtek-to-xmltv that referenced this issue Aug 4, 2019
@avp90
Copy link
Author

avp90 commented Aug 4, 2019

fixed with last commit

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