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

Problems downloading #3

Open
ivolis opened this issue Aug 23, 2023 · 0 comments
Open

Problems downloading #3

ivolis opened this issue Aug 23, 2023 · 0 comments

Comments

@ivolis
Copy link

ivolis commented Aug 23, 2023

Specs

OS: Zorin OS 16.2 (Ubuntu 20.04)
(I am currently neither using nor downloaded Google Chrome. I use Firefox... maybe that would be a problem?)
Python 3.9.13
Pandas 1.3.5
selenium 4.11.2
requests 2.31.0

Butterfly

Because I got an error with the other cell, I ran the next one as instructed:

import requests

print('Downloading Butterfly zip file')
file_id = '18I4N6lWdcUW618Qwr6Krsd1Rkn946Ag0' # sharable link id
zip_file_path = os.path.join(get_download_path(), 'butterfly.zip')
download_file_from_google_drive(file_id, zip_file_path)

# unzip video files
print('Download complete\nExtracting video files')
open_file = subprocess.Popen("utils/7z.exe" +' x ' + zip_file_path + ' -o' + 'data/video',stdout=subprocess.PIPE)
print('Extraction complete')

But I got:

ValueError: cannot convert float NaN to integer

Tracing the error back, seems to be a problem with Progressbar:

ValueError                                Traceback (most recent call last)
/tmp/ipykernel_97816/3349704168.py in <module>
      4 file_id = '18I4N6lWdcUW618Qwr6Krsd1Rkn946Ag0' # sharable link id
      5 zip_file_path = os.path.join(get_download_path(), 'butterfly.zip')
----> 6 download_file_from_google_drive(file_id, zip_file_path)
      7 
      8 # unzip video files

/tmp/ipykernel_97816/1754689086.py in download_file_from_google_drive(id, destination)
     12         response = session.get(URL, params = params, stream = True)
     13 
---> 14     save_response_content(response, destination)
     15 
     16 def get_confirm_token(response):

/tmp/ipykernel_97816/1754689086.py in save_response_content(response, destination)
     26 
     27     with open(destination, "wb") as f:
---> 28         for chunk in progress(response.iter_content(CHUNK_SIZE)):
     29             if chunk: # filter out keep-alive new chunks
     30                 f.write(chunk)

Clarius

The code:

import requests

print('Downloading Clarius zip file...')
file_id = '1bqsqNzAJYwdriOP9CcGWPzCUB-7G72Ta' # sharable link id
zip_file_path = 'C:\\Users\\Ebadia\\Downloads\\clarius.zip' #os.path.join(get_download_path(), 'clarius.zip')
download_file_from_google_drive(file_id, zip_file_path)

# unzip video files
open_file = subprocess.Popen("utils/7z.exe" +' x ' + zip_file_path + ' -o' + 'data/video',stdout=subprocess.PIPE)
print('=== Clarius video files extraction done! ===')

Throws:

FileNotFoundError: [Errno 2] No such file or directory: 'utils/7z.exe x C:\\Users\\Ebadia\\Downloads\\clarius.zip -odata/video': 'utils/7z.exe x C:\\Users\\Ebadia\\Downloads\\clarius.zip -odata/video'

Seems to be hard-coded but I dont get how can I change that.
Or maybe the download link or something like that is deprecated?

Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant