python-docker-tutorial icon indicating copy to clipboard operation
python-docker-tutorial copied to clipboard

IMDB format change

Open ellisdoro opened this issue 10 months ago • 0 comments

When I run, I get the following error:

docker run python-imdb Traceback (most recent call last): File "//./main.py", line 46, in <module> main() File "//./main.py", line 33, in main idx = random.randrange(0, n_movies) File "/usr/local/lib/python3.9/random.py", line 316, in randrange raise ValueError("empty range for randrange() (%d, %d, %d)" % (istart, istop, width)) ValueError: empty range for randrange() (0, 0, 0)

I can resolve the error by changing the URL from https://www.imdb.com/chart/top/ to a version archived from the wayback machine from March 2022: https://web.archive.org/web/20220314214330/https://www.imdb.com/chart/top, so it seems as though the error is from a change in how imdb formats its movie lists.

ellisdoro avatar Feb 07 '25 05:02 ellisdoro