Skip to content

--update-database flag is broken #6

@Ohadbasan

Description

@Ohadbasan

Hello!

I am trying to initialize the db

python src/preprocess.py --update_database

INFO:__main__:Updating database
INFO:__main__:Downloading from https://sponsor.ajay.app/database/sponsorTimes.csv
Traceback (most recent call last):
  File "/Users/ohadbasan/sponsorblock-ml/src/preprocess.py", line 979, in <module>
    main()
  File "/Users/ohadbasan/sponsorblock-ml/src/preprocess.py", line 529, in main
    if download_file(mirror, raw_dataset_path):
  File "/Users/ohadbasan/sponsorblock-ml/src/preprocess.py", line 497, in download_file
    total_bytes = int(r.headers['Content-Length'])
  File "/Users/ohadbasan/code/orchestration/venv/lib/python3.10/site-packages/requests/structures.py", line 52, in __getitem__
    return self._store[key.lower()][1]
KeyError: 'content-length'

it looks like the link https://sponsor.ajay.app/database/sponsorTimes.csv is not operational

here is a fix
#7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions