Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error downloading proteome subsets #60

Open
alex-hh opened this issue Oct 12, 2024 · 2 comments
Open

Error downloading proteome subsets #60

alex-hh opened this issue Oct 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@alex-hh
Copy link

alex-hh commented Oct 12, 2024

I get the following error downloading AFDB proteome subsets with foldcomp.setup
Other dbs download successfully

----> 1 foldcomp.setup('h_sapiens')

File ~/envs/devo/lib/python3.10/site-packages/foldcomp/setup.py:87, in setup(db, download_chunks)
85 def setup(db="afdb_swissprot", download_chunks=16):
86 for i in ["", ".index", ".dbtype", ".lookup", ".source"]:
---> 87 asyncio.run(
88 download(
89 f"https://foldcomp.steineggerlab.workers.dev/{db}{i}",
90 f"{db}{i}",
91 chunks=download_chunks,
92 )
93 )

File /usr/lib/python3.10/asyncio/runners.py:44, in run(main, debug)
42 if debug is not None:
43 loop.set_debug(debug)
---> 44 return loop.run_until_complete(main)
45 finally:
46 try:

File /usr/lib/python3.10/asyncio/base_events.py:649, in BaseEventLoop.run_until_complete(self, future)
646 if not future.done():
647 raise RuntimeError('Event loop stopped before Future completed.')
--> 649 return future.result()

File ~/envs/devo/lib/python3.10/site-packages/foldcomp/setup.py:35, in download(url, output, chunks)
33 async def download(url, output, chunks=16):
34 async with httpx.AsyncClient() as client:
---> 35 file_size = await get_size(client, url)
37 # check that file is not already downloaded
38 if os.path.exists(output) and os.path.getsize(output) == file_size:

File ~/envs/devo/lib/python3.10/site-packages/foldcomp/setup.py:8, in get_size(client, url)
6 async def get_size(client, url):
7 response = await client.head(url=url)
----> 8 return int(response.headers["Content-Length"])

File ~/envs/devo/lib/python3.10/site-packages/httpx/_models.py:228, in Headers.getitem(self, key)
225 if items:
226 return ", ".join(items)
--> 228 raise KeyError(key)

KeyError: 'Content-Length'

@alex-hh
Copy link
Author

alex-hh commented Oct 13, 2024

(the download seems to complete successfully despite the error i think?)

@khb7840
Copy link
Member

khb7840 commented Oct 15, 2024

Thank you for notifying me this. We were aware of this error log and the downloaded database seems fine. I'll try to fix this soon.

@khb7840 khb7840 added the bug Something isn't working label Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants