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

unable to download any course. #89

Open
fazlan1990 opened this issue Feb 28, 2025 · 1 comment · May be fixed by #90
Open

unable to download any course. #89

fazlan1990 opened this issue Feb 28, 2025 · 1 comment · May be fixed by #90

Comments

@fazlan1990
Copy link

getting below error on both windows and linux.

Enter the courses you want to select (Multiple courses can be passes using this format 1,6-9,10-11): 126
Traceback (most recent call last):
File "/home/ivuser/.local/bin/kodekloud", line 8, in
sys.exit(kodekloud())
File "/home/ivuser/.local/lib/python3.10/site-packages/click/core.py", line 1161, in call
return self.main(*args, **kwargs)
File "/home/ivuser/.local/lib/python3.10/site-packages/click/core.py", line 1082, in main
rv = self.invoke(ctx)
File "/home/ivuser/.local/lib/python3.10/site-packages/click/core.py", line 1697, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ivuser/.local/lib/python3.10/site-packages/click/core.py", line 1443, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ivuser/.local/lib/python3.10/site-packages/click/core.py", line 788, in invoke
return __callback(*args, **kwargs)
File "/home/ivuser/.local/lib/python3.10/site-packages/kodekloud_downloader/cli.py", line 69, in dl
download_course(
File "/home/ivuser/.local/lib/python3.10/site-packages/kodekloud_downloader/main.py", line 126, in download_course
fetch_course_detail(course.slug) if isinstance(course, Course) else course
File "/home/ivuser/.local/lib/python3.10/site-packages/kodekloud_downloader/models/helper.py", line 36, in fetch_course_detail
return CourseDetail(**data)
File "/home/ivuser/.local/lib/python3.10/site-packages/pydantic/main.py", line 214, in init
validated_self = self.pydantic_validator.validate_python(data, self_instance=self)
pydantic_core._pydantic_core.ValidationError: 1 validation error for CourseDetail
includes_section.community_support
Field required [type=missing, input_value={'modules_count': 8, 'les...course_duration': 13154}, input_type=dict]
For further information visit https://errors.pydantic.dev/2.10/v/missing
f$

@iamamansharma
Copy link

iamamansharma commented Mar 5, 2025

I was able to resolve this.
In the model IncludesSection in kodekloud-downloader/src/kodekloud_downloader/models/course.py the field community_support doesn't exists anymore. Also, a new field is included (course_duration).

This PR did work on that change but the new package was not published on pypi.

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants