Skip to content

BadZipFile when trying to run Dash for the first time #28

Open

Description

@JannisNe

I tried to start up dash for the first time and I got an error when it tried unzipping the models file with the traceback below. I also tried downloading it manually from https://github.com/daniel-muthukrishna/astrodash/blob/master/astrodash/models_v06.zip with the same result. Also, unzipping manually gives me an error. Is the file damaged?

Downloading data files from https://github.com/daniel-muthukrishna/astrodash/blob/master/astrodash/models_v06.zip?raw=true... 
This download contains the Tensorflow models trained using deep learning. 
The file to be downloaded is ~200MB. However, this is a one time download, and will only occur
the very first time that this version of DASH is installed.
Download complete! File saved to /Users/jannisnecker/opt/miniconda3/envs/dash/lib/python3.11/site-packages/astrodash/models_v06.zip.
Unzipping data files...
Traceback (most recent call last):
  File "/Users/jannisnecker/opt/miniconda3/envs/dash/bin/astrodash", line 5, in <module>
    from astrodash import run_gui
  File "/Users/jannisnecker/opt/miniconda3/envs/dash/lib/python3.11/site-packages/astrodash/__init__.py", line 5, in <module>
    download_all_files('v06')
  File "/Users/jannisnecker/opt/miniconda3/envs/dash/lib/python3.11/site-packages/astrodash/download_data_files.py", line 51, in download_all_files
    download_file(saveFilenames[i], urlpaths[i], printStatuses[i], scriptDirectory)
  File "/Users/jannisnecker/opt/miniconda3/envs/dash/lib/python3.11/site-packages/astrodash/download_data_files.py", line 20, in download_file
    unzip_data_files(filename)
  File "/Users/jannisnecker/opt/miniconda3/envs/dash/lib/python3.11/site-packages/astrodash/unzip_data_files.py", line 8, in unzip_data_files
    zipRef = zipfile.ZipFile(os.path.join(scriptDirectory, dataZipFilename), 'r')
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/jannisnecker/opt/miniconda3/envs/dash/lib/python3.11/zipfile.py", line 1312, in __init__
    self._RealGetContents()
  File "/Users/jannisnecker/opt/miniconda3/envs/dash/lib/python3.11/zipfile.py", line 1379, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

Activity

  1. rjoebruch commented on Aug 19, 2024

    @rjoebruch

    Hi!
    Jut would like to second this problem.

    I have a M2 Macbook air, and I am using a python = 3.8 environment.
    I also get the same error when trying to run astrodash for the first time.

    EDIT: I can't even unzip it manually, the file is 134bytes.
    I went to your proposed solution: https://zenodo.org/records/7760927 , downloaded the file and replaced in manually where astrodash is installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions