I got the same error; here's what I did.
1. Locate iTunes folder, and navigate to it.
e.g. C:\Users\me\Documents\My Music\iTunes
2. Rename iTunes Library.itl to iTunes Library-10.4.itl
3. Open up the Previous iTunes Libraries folder.
C:\My Documents\My Music\iTunes
4. Copy the last file in the folder - probably has the date that you upgraded to 10.4 on it. Modified date should show the date before you upgraded. Mine was dated 7-24 but had a modified date of 7-19 or 7-20.
5. Go up one directory, paste the file.
6. Rename to iTunes Library.itl
7. Open iTunes.