sverrirs / ruvsarpur

Python script to download shows off the Icelandic RÚV website.
https://sverrirs.github.io/ruvsarpur/
MIT License
65 stars 16 forks source link

Current version is broken, TypeError: 'NoneType' object does not support item assignment #25

Closed olafure closed 1 year ago

olafure commented 1 year ago
python ./src/ruvsarpur.py --ffmpeg /local/bin/ffmpeg -q HD1080 --pid blabla
/local/data/projects/3rd-projects/ruvsarpur/.venv/lib/python3.10/site-packages/fuzzywuzzy/fuzz.py:11: UserWarning: Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning
  warnings.warn('Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning')
The '--imdbfolder' argument is not set, this will impact IMDB matching for non-english content, consider setting this parameter and downloading the 'title.basics.tsv' file from https://www.imdb.com/interfaces/
Downloading VOD schedule | Total: 741 series available
 Reading: |-------------------------| 1.9% Unable to retrieve schedule for VOD program 'Allt, alls staðar, alltaf', no episodes will be available for download from this program.
Traceback (most recent call last):
  File "/local/data/projects/3rd-projects/ruvsarpur/./src/ruvsarpur.py", line 958, in getVodSchedule
    program_schedule = getVodSeriesSchedule(program['id'], program, imdb_cache, imdb_orignal_titles)
  File "/local/data/projects/3rd-projects/ruvsarpur/./src/ruvsarpur.py", line 1086, in getVodSeriesSchedule
    imdb_cache[str(sid)] = {
TypeError: 'NoneType' object does not support item assignment

Probably because getExistingJsonFile returns None if file doesn't exists.

sverrirs commented 1 year ago

Gætirðu prófað þetta aftur með þessu fixi?

olafure commented 1 year ago

Bilað, en með öðrum hætti. Þú getur prófað þetta með því að rename-a ~/.ruvsarpur eitthvað annað.

# python ./src/ruvsarpur.py --ffmpeg /local/bin/ffmpeg -q HD1080 --pid blabla

The '--imdbfolder' argument is not set, this will impact IMDB matching for non-english content, consider setting this parameter and downloading the 'title.basics.tsv' file from https://www.imdb.com/interfaces/
Downloading VOD schedule | Total: 743 series available
 Reading: |-------------------------| 0.4% Unable to retrieve schedule for VOD program 'A Late Quartet', no episodes will be available for download from this program.
Traceback (most recent call last):
  File "/local/data/projects/3rd-projects/ruvsarpur/./src/ruvsarpur.py", line 958, in getVodSchedule
    program_schedule = getVodSeriesSchedule(program['id'], program, imdb_cache, imdb_orignal_titles)
  File "/local/data/projects/3rd-projects/ruvsarpur/./src/ruvsarpur.py", line 1086, in getVodSeriesSchedule
    imdb_cache[str(sid)] = {
TypeError: list indices must be integers or slices, not str

 Reading: |=------------------------| 3.1% Unable to retrieve schedule for VOD program 'Amma Hófí', no episodes will be available for download from this program.
Traceback (most recent call last):
  File "/local/data/projects/3rd-projects/ruvsarpur/./src/ruvsarpur.py", line 958, in getVodSchedule
    program_schedule = getVodSeriesSchedule(program['id'], program, imdb_cache, imdb_orignal_titles)
  File "/local/data/projects/3rd-projects/ruvsarpur/./src/ruvsarpur.py", line 1086, in getVodSeriesSchedule
    imdb_cache[str(sid)] = {
TypeError: list indices must be integers or slices, not str
sverrirs commented 1 year ago

Takk fyrir þetta @olafure, þetta var heimskuleg villa hjá mér. Fixað og testað ;)