Json Decoder Error

Author: terabox00012-codeCreated Aug 1, 2025Updated Nov 15, 2025

**

json decoder eroor

**

Your environment

  • Operating System (Windows11/23H2):
  • Python version: Python 3.12.6
  • coursera-dl version:0.11.5

Steps to reproduce just after doing the normal download commads , like give username ,password,CAuth and course name i get this { json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) } error

Actual behaviour

facing this error

D:\Coursera Courses\coursera>coursera-dl -ca 0-e0Cn3jKocqZOM8ZA_Ou8ROkK6mIyO9-w_cUVfvezF1TogcJRjvpDSZ5L1PcNrgJB07167r8DfQfy_rLM6LiQ.NdBvcN0Wa5SglJdr9rMa_g.I7KJOp6SRBMbzRA8UOhPZ1j9JGzE5zvgR7YPx60GERDuCnfrNPd8XUCtqvkzggcXXRfSoMxgRilKVNqle9HK2YaTnlQLKsPifzJnIQz3qhqtFOUqpjjK2GVDeV4Alp7nOeclq_3UC-wbsEUDbQtvsd32Bz1Ndj_WiJks6q6NJQmi-LzuTTT5zJyRaWKbit0wcj9yMY0dwThbAj2_tC27lhTT_4FeEUXIsGj8Yg8k-wB8A2h0Z6kvLKSzYYPfBqclwbKMky_CeB6I2TZrUKiXVLW-tJDpT8g4zniYNIlP7r8rXuixi9ntHtAsdi5zjI-PrcipBK5JsFKFPftg19AGB5u0wEmMY9Mo6Ny1uvLcLIO4vhpHIh_z5oKZnz7JNEWZkxAYGtz26AIjCOK4RinbRIf983sPQP9pK4nB6oquZHmLSYWE3rEpYboapayaYuo7w06WErdkiw3adM5yc177N83k2E-v5wBS_CrrFqU0r30C2yJlnn-ZbkIfUo0v1MyI introduction-portfolio-construction-python

coursera_dl version 0.11.5
Downloading class: introduction-portfolio-construction-python (1 / 1)
Parsing syllabus of on-demand course (id=qeyXSV_uEeiNIQqyU-T6bA). This may take some time, please be patient ...
Traceback (most recent call last):
  File "D:\Python\Lib\site-packages\requests\models.py", line 976, in json
    return complexjson.loads(self.text, **kwargs)
           ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "D:\Python\Lib\json\__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^
  File "D:\Python\Lib\json\decoder.py", line 345, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Python\Lib\json\decoder.py", line 363, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "D:\Python\Scripts\coursera-dl.exe\__main__.py", line 6, in <module>
    sys.exit(main())
             ~~~~^^
  File "D:\Python\Lib\site-packages\coursera\coursera_dl.py", line 247, in main
    error_occurred, completed = download_class(
                                ~~~~~~~~~~~~~~^
        session, args, class_name)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Python\Lib\site-packages\coursera\coursera_dl.py", line 214, in download_class
    return download_on_demand_class(session, args, class_name)
  File "D:\Python\Lib\site-packages\coursera\coursera_dl.py", line 134, in download_on_demand_class
    error_occurred, modules = extractor.get_modules(
                              ~~~~~~~~~~~~~~~~~~~~~^
        class_name,
        ^^^^^^^^^^^
    ...<6 lines>...
        args.download_notebooks
        ^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "D:\Python\Lib\site-packages\coursera\extractors.py", line 53, in get_modules
    error_occurred, modules = self._parse_on_demand_syllabus(
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
        class_name,
        ^^^^^^^^^^^
        page, reverse, unrestricted_filenames,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        subtitle_language, video_resolution,
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        download_quizzes, mathjax_cdn_url, download_notebooks)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Python\Lib\site-packages\coursera\extractors.py", line 105, in _parse_on_demand_syllabus
    ondemand_material_items = OnDemandCourseMaterialItemsV1.create(
        session=self._session, course_name=course_name)
  File "D:\Python\Lib\site-packages\coursera\api.py", line 318, in create
    dom = get_page(session, OPENCOURSE_ONDEMAND_COURSE_MATERIALS,
                   json=True,
                   class_name=course_name)
  File "D:\Python\Lib\site-packages\coursera\network.py", line 93, in get_page
    return reply.json() if json else reply.text
           ~~~~~~~~~~^^
  File "D:\Python\Lib\site-packages\requests\models.py", line 980, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

D:\Coursera Courses\coursera>
Image