nanoporetech / bonito

A PyTorch Basecaller for Oxford Nanopore Reads

Home Page:https://nanoporetech.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error when downloading training data

thallinger opened this issue · comments

Brief description of the issue

When trying to download training data with bonito the error message File is not a zip file file is displayed.

Steps to reproduce

$ bonito download --training

[downloading training data]
[downloaded dna_r9.4.1.hdf5.zip]
Traceback (most recent call last):
  File "/home/thallinger/.local/bin/bonito", line 8, in <module>
    sys.exit(main())
  File "/home/thallinger/.local/lib/python3.10/site-packages/bonito/__init__.py", line 34, in main
    args.func(args)
  File "/home/thallinger/.local/lib/python3.10/site-packages/bonito/cli/download.py", line 135, in main
    File(__data__, train, args.force).download()
  File "/home/thallinger/.local/lib/python3.10/site-packages/bonito/cli/download.py", line 66, in download
    with ZipFile(self.location(fname), 'r') as zfile:
  File "/usr/lib/python3.10/zipfile.py", line 1267, in __init__
    self._RealGetContents()
  File "/usr/lib/python3.10/zipfile.py", line 1334, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

The content of the downloaded file is the following:

$ more .local/lib/python3.10/site-packages/bonito/data/dna_r9.4.1.hdf5.zip

<?xml version="1.0" encoding="UTF-8"?>
<Error>
  <Code>AccessDenied</Code>
  <Message>Access Denied</Message>
  <RequestId>WRGMADD4PW5WN1M5</RequestId>
  <HostId>gsF+Me765ET9pQCJT3LMOpoKrUtntrAxHPsGpgz2yNNio3QFK/VFMOYUdZXz5kX0UuoPhXvSWNk=</HostId>
</Error>

Environment

bonito -v
bonito 0.7.0

python3 --version
Python 3.10.6
commented
  • @iiSeymour This is another bug caused by f2f1a7e
  • I already made a PR #343 to fix #337 (which also caused by f2f1a7e )
  • So I made a new PR #344 to fix this (not elegant, but minimum changes)
  • @iiSeymour Feel free to close both of them and make a combined changes in a better way