griffithlab / civicpy

A python interface for the CIViC db application
MIT License
8 stars 5 forks source link

civicpy cache truncated? #148

Open zhanyinx opened 1 day ago

zhanyinx commented 1 day ago

Hi there,

thanks for providing the tools for interacting with CIViC database. Since a couple of days I encounter the problem with the cache. It appears that https://civicdb.org/downloads/nightly/nightly-civicpy_cache.pkl seems truncated.

When I run

civicpy update

I got the following error message

WARNING:root:Downloading remote cache from https://civicdb.org/downloads/nightly/nightly-civicpy_cache.pkl.
Traceback (most recent call last):
  File "/usr/local/bin/civicpy", line 8, in <module>
    sys.exit(cli())
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.7/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/civicpy/cli.py", line 27, in update
    civic.update_cache(from_remote_cache=soft, local_cache_path=cache_save_path)
  File "/usr/local/lib/python3.7/site-packages/civicpy/civic.py", line 266, in update_cache
    load_cache(local_cache_path=local_cache_path)
  File "/usr/local/lib/python3.7/site-packages/civicpy/civic.py", line 196, in load_cache
    loaded_cache = pickle.load(pf)
_pickle.UnpicklingError: pickle data was truncated

Thanks for your help Best Zhan

jsstevenson commented 20 hours ago

+1 getting the same error for today's (2024-09-26) nightly pkl. Maybe a malformed upload?

susannasiebert commented 9 hours ago

We recently made some changes to the CIViC database schema to accommodate fusions, which we suspect is causing issues when creating the pkl file. We will investigate further and hope to release a fix next week.