Valentin-Metz / tum_video_scraper

Download and jumpcut lecture videos from https://live.rbg.tum.de/ and https://tum.cloud.panopto.eu/
55 stars 5 forks source link

Error: name 'cfg' is not defined #7

Closed lamyergeier closed 1 year ago

lamyergeier commented 1 year ago

I tried downloading a course: TUM-Live Concepts of C++ programming (IN2377)

(venv) $ python main.py  -o  /home/lamy/Documents/Study/2022WS --tum_live ConceptsCpp:2022/W/cpp:COMB -u "${TumID}" -p "${Password}"
Traceback (most recent call last):
  File "/home/lamy/opt/Library/LibrarySrc/tum_video_scraper/src/main.py", line 81, in <module>
    if cfg and 'Output-Folder' in cfg:
NameError: name 'cfg' is not defined

Can you please suggest what needs to be done? I am not that experienced with python.

nilsreichardt commented 1 year ago

The problem that is that the python code is searching for a config file. However, you have not specified a config file. I fixed this issue by just creating an empty config file:


# Create an empty config file
touch config.yaml

# Run the script
python3 src/main.py --username "..." --password "..." --tum_live "ds:2022/W/DS:COMB" --config_file "config.yaml" -o "download/"
Valentin-Metz commented 1 year ago

Fixed in 06790f94f2e03746f76a669cb06182b7fbb74bf6.