Python Help

Hello All,
Apologies if this is not the appropriate place for this. I’m only a beginner in python and have run in to a problem that I need to solve.

I am trying to download zoom cloud recordings for where I work, and have found this bit of code on github.

The weird thing is, while this works for two users, I then get the following message, and it stops.

Traceback (most recent call last):
File “zoom-recording-downloader.py”, line 274, in
main()
File “zoom-recording-downloader.py”, line 245, in main
downloads = get_downloads(recording)
File “zoom-recording-downloader.py”, line 111, in get_downloads
recording_type = download[‘recording_type’]
KeyError: ‘recording_type’

I’m just a baby when it comes to python. can anyone shed some light on what exactly is going on here?

Thanks!

The error means the recording_type key does not exist in download. My first guess is that there’s a problem in get_downloads which is causing it to return a value the rest of the application didn’t expect, but it’s hard to tell just from that fragment of an error message.

Did you try change order of users?
Because after looking at code its looks more like specific user you getting error on doesn’t have dictionary properly populated.

I would put “try…except” block inside loop starting at line 229, so it skips to next user if there is exception during get_downloads()

maybe you need correct scope, also try to see first if you get actual data from their API request tester https://marketplace.zoom.us/docs/api-reference/zoom-api/cloud-recording/getaccountcloudrecording