Comments (3)
I have the same (or a very similar) problem. It ran fine on version 2.1.2.6 last year. My school updated moodle for this school year and it didn't work. I updated the configuration (with moodle-dl -c) and tried again. I got the same error. Then I updated moodle-dl to version 2.3.2.0 and tried again. I got the same error (differently formatted, but the same message) this time. I updated the config file again and the error stayed.
Here the (imho) relevant part of the error message (with the -v flag)
2023-09-01 16:02:48 DEBUG {request_helper} Details about the failed request:
URL: https://censored.example.com/webservice/rest/server.php?moodlewsrestformat=json&wsfunction=core_course_get_contents
Body: {'moodlewssettingfilter': 'true', 'moodlewssettingfileurl': 'true', 'courseid': 2951, 'wsfunction': 'core_course_get_contents', 'wstoken': 'censored'}
The following error occurred during execution:
The Moodle System rejected the Request. Details: moodle_exception (Error code: cannotgetcoursecontents, Message: Kursinhalte können nicht geladen werden.)
2023-09-01 16:02:48 DEBUG {mail_service} Mail-Notifications not configured, skipping.
2023-09-01 16:02:48 INFO {telegram_service} Sending Notification via Telegram...
2023-09-01 16:02:48 DEBUG {connectionpool} Starting new HTTPS connection (1): api.telegram.org:443
2023-09-01 16:02:48 DEBUG {connectionpool} https://api.telegram.org:443 "POST /CENSORED/sendMessage HTTP/1.1" 200 467
2023-09-01 16:02:48 DEBUG {xmpp_service} XMPP-Notifications not configured, skipping.
2023-09-01 16:02:48 ERROR {main} Traceback (most recent call last):
File "/home/moodle-dl/.local/lib/python3.7/site-packages/moodle_dl/main.py", line 536, in main
choose_task(config, opts)
File "/home/moodle-dl/.local/lib/python3.7/site-packages/moodle_dl/main.py", line 68, in choose_task
run_main(config, opts)
File "/home/moodle-dl/.local/lib/python3.7/site-packages/moodle_dl/main.py", line 136, in run_main
raise base_err
File "/home/moodle-dl/.local/lib/python3.7/site-packages/moodle_dl/main.py", line 95, in run_main
changed_courses = asyncio.run(moodle.fetch_state(database))
File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete
return future.result()
File "/home/moodle-dl/.local/lib/python3.7/site-packages/moodle_dl/moodle/moodle_service.py", line 117, in fetch_state
course_cores = await core_handler.async_load_course_cores(courses)
File "/home/moodle-dl/.local/lib/python3.7/site-packages/moodle_dl/moodle/core_handler.py", line 157, in async_load_course_cores
cores = await asyncio.gather(*async_features)
File "/home/moodle-dl/.local/lib/python3.7/site-packages/moodle_dl/utils.py", line 64, in run_with_final_message
result = await load_function(entry)
File "/home/moodle-dl/.local/lib/python3.7/site-packages/moodle_dl/moodle/core_handler.py", line 166, in async_load_course_core
return await self.client.async_post('core_course_get_contents', data)
File "/home/moodle-dl/.local/lib/python3.7/site-packages/moodle_dl/moodle/request_helper.py", line 141, in async_post
self.check_json_for_moodle_error(resp_json, url, data)
File "/home/moodle-dl/.local/lib/python3.7/site-packages/moodle_dl/moodle/request_helper.py", line 328, in check_json_for_moodle_error
+ f" Message: {resp_json.get('message', '')})"
moodle_dl.moodle.request_helper.RequestRejectedError: The Moodle System rejected the Request. Details: moodle_exception (Error code: cannotgetcoursecontents, Message: Kursinhalte können nicht geladen werden.)
2023-09-01 16:02:48 DEBUG {main} Exception-Handling completed. Exiting...
The current moodle version according to /lib/upgrade.txt is 4.1.5, I don't know the previous version.
If you need more information, I would be happy to provide it
Thank you for the amazing project btw., it saved me a lot of hassle for the last three years.
from moodle-dl.
@Aunib
That is a completly different issue. Please move it into an own issue.
from moodle-dl.
Looks like a misconfiguration of your moodle instance, see https://moodle.org/mod/forum/discuss.php?d=343122 or https://moodle.org/mod/forum/discuss.php?d=355334
My guess is that for one of your lessons there is an error on the server. Currentlly moodle-dl has no option to deactivate loading of top level entries like lesson names. We should implement it.
from moodle-dl.
Related Issues (20)
- Add Regex filtering for black and whitelists HOT 6
- On macos a shortcut should be a webloc file
- The detection of moved files seems to be unreliable
- Ignored --skip-cert-verify --allow-insecure-ssl HOT 8
- Moodle System rejected the Request due to an Invalid parameter value HOT 9
- AttributeError: 'XSOEnumMixin' object has no attribute 'name' HOT 8
- Crash when downloading course information HOT 3
- Don't try to download the mailto links HOT 2
- Nothing downloads HOT 3
- Download fails on some courses HOT 1
- Unable to lock cache on Moodle v4 HOT 4
- Retry on timeout
- config.json should be created unreadable to others HOT 2
- Do not download large files HOT 3
- Usage of -nt -u -pw just hangs moodle-dl HOT 1
- Same file with identical content gets downloaded again every time Moodle-DL is executed HOT 5
- NoneType has no len() - not downloading HOT 1
- Size estimation increases during download HOT 8
- Rework optional downloads
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from moodle-dl.