I was having an requests.exceptions.HTTPError: 404 Client Error: Not Found for url: error.

I noticed after reading some of the documentation on Goodreads that we can use either 10-digit ISBNs or 13-digit ISBNs (I use "digit" while realizing that sometimes an ISBN has letters). Many of the ISBNs given in the books.csv file are only 9 digits. I think they're supposed to have a "0" before them, as I saw on my Goodreads app while comparing ISBNs. At first I thought I had messed with the file somehow, but I redownloaded the books.csv file to compare, and there was no difference.

Is this an issue for anyone else? When I try to add a 0 before the number (ex: Orson Scott Card's book The Memory of Earth has an ISBN of 812532597 according to books.csv, and an ISBN of 0812532597 according to the Goodreads app), I get an error saying the list index is out of range.

Is this something I can work around - other than only searching for books with the correct ISBN length - and short of going into the database and adding a zero before each 9-digit ISBN, would it make sense to stick on a "0" in my application.py somehow?

2 Answers 2


The isbn number in the books.csv file that I have are all 10 characters and many do have a zero as the first character.

How are you viewing your books.csv file? Excel?

What you really want to do is re-create your books table with the isbn column being VARCHAR.

Then re-import the books.csv file.

  • My books table does have ISBN as VARCHAR. I did open the books.csv file as Excel and Notepad, and they looked the same. I know Excel removes unnecessary preceding 0s, so maybe because I opened it in Excel, I ruined the file?
    – azb1297
    Apr 9, 2020 at 16:38

Ended up re-downloading the books.csv file and re-importing. Everything was good after that

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .