openzim / openedx

Open edX (to zim) scraper
GNU General Public License v3.0
8 stars 7 forks source link

JSONDecodeError while scraping #56

Closed satyamtg closed 4 years ago

satyamtg commented 4 years ago

While scraping the course https://courses.edx.org/courses/course-v1:MITx+17.571x+1T2020/course/ , DragAndDropV2 fails with the following:

Traceback (most recent call last):
  File "/home/satyamtg/gsoc/experiments/openedx/venv/lib/python3.8/site-packages/openedx2zim-1.0.0.dev0-py3.8.egg/openedx2zim/entrypoint.py", line 148, in main
    scraper.run()
  File "/home/satyamtg/gsoc/experiments/openedx/venv/lib/python3.8/site-packages/openedx2zim-1.0.0.dev0-py3.8.egg/openedx2zim/scraper.py", line 442, in run
    self.download(connection)
  File "/home/satyamtg/gsoc/experiments/openedx/venv/lib/python3.8/site-packages/openedx2zim-1.0.0.dev0-py3.8.egg/openedx2zim/scraper.py", line 370, in download
    obj.download(connection)
  File "/home/satyamtg/gsoc/experiments/openedx/venv/lib/python3.8/site-packages/openedx2zim-1.0.0.dev0-py3.8.egg/openedx2zim/xblocks_extractor/DragAndDropV2.py", line 23, in download
    self.content = json.loads(
  File "/usr/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python3.8/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)