csyezheng / edx-helper

A command line tool for downloading courses from edx.org.
GNU Lesser General Public License v3.0
33 stars 12 forks source link

Crash when using list-courses #6

Open limdingwen opened 7 months ago

limdingwen commented 7 months ago

🚨Please review the Troubleshooting section before reporting any issue. Don't forget also to check the current issues to avoid duplicates.

Subject of the issue

Crashes when using --list-courses.

Your environment

Steps to reproduce

Use --list-courses with valid credentials. Login works.

Expected behaviour

The courses are listed.

Actual behaviour

The following exception occurs after 1 course is listed:

WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
edx_helper version 0.6.0
Building initial headers for future requests.
Getting initial CSRF token.
Found CSRF token.
Logging into Open edX site: https://courses.edx.org/login_ajax
Extracting courses from dashboard api: https://courses.edx.org/api/learner_home/init
You can access 5 courses
 1 - β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ [β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ]
Traceback (most recent call last):
  File "/usr/local/bin/edx-helper", line 33, in <module>
    sys.exit(load_entry_point('edx-helper==0.6.0', 'console_scripts', 'edx-helper')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/edx_helper-0.6.0-py3.11.egg/edx_helper/edx_dl.py", line 1154, in main
  File "/usr/local/lib/python3.11/site-packages/edx_helper-0.6.0-py3.11.egg/edx_helper/edx_dl.py", line 640, in parse_courses
  File "/usr/local/lib/python3.11/site-packages/edx_helper-0.6.0-py3.11.egg/edx_helper/edx_dl.py", line 147, in _display_courses
AttributeError: 'Course' object has no attribute 'url'