c-w / gutenberg

A simple interface to the Project Gutenberg corpus.
Apache License 2.0
320 stars 60 forks source link

The cache is invalid or not created #112

Open carlosalvidrez opened 6 years ago

carlosalvidrez commented 6 years ago

Hi guys, I got the cache ... used it well, but after upgrading my computer's OS, I started getting this error. I know I have the cache in the same place, same permissions (everyone can read+write), and yet I get this error when invoking the get_metadata method. Any hints?

"The cache is invalid or not created"

I'd like to avoid having to recreate the cache, as it may take hours on end to download.

Thanks!

c-w commented 6 years ago

Thanks for reaching out. I haven't experienced this issue before. Could you provide some more details on your OS version before/after the update, your Python version, which metadata store you're using (Fuseki, SleeypyCat or SQLite), etc.? Thanks in advance!

c-w commented 5 years ago

Resolving since there was no activity on this issue in a while. Please feel free to re-open with the additional information requested above if you still require assistance. Thanks in advance!

haoyudong-97 commented 4 years ago

hi @c-w , I experience the same issue. But instead of updating the system, I tried to do something with all books in english, i.e. book_ids = get_etexts('language', target_language). After that, the cache becomes invalid and I have to re-download it for hours.

brendanlafferty commented 4 years ago

Hi I just encountered something similar. I was running my code a couple of times and this error popped up

...
MemoryError: (12, 'Cannot allocate memory -- Lock table is out of available locker entries')

During handling of the above exception, another exception occurred:
...
    raise InvalidCacheException('The cache is invalid or not created')
gutenberg._domain_model.exceptions.InvalidCacheException: The cache is invalid or not created

Searching for the memory error I found this resource: major.io

I'm going to see if this sorts out the issue and get back to you

Relavent info for my situation: only using: gutenberg.query.api.git_metadata() and I'm using it to get the author and titles only

I'm running

brendanlafferty commented 4 years ago

Unfortunately I don't know too much about what I'm doing. I realize now the reference I listed just rebuilds their data base : ( . but it looks like they identified an issue with stopping the process with keyboard interrupts. Which definitely could be the reason I ran into this error. I have canceled a few scripts mid process and it happened just after making a few tweaks and restarting : (. Not sure if you can help, but I'd appreciate any advice/perspective : )