NDAR / nda-tools

Python package for interacting with NDA web services. Used to validate, submit, and download data to and from NDA.
MIT License
48 stars 21 forks source link

Download Package Bug? #57

Closed JBarsotti closed 1 year ago

JBarsotti commented 1 year ago

Hi,

Sorry to hit you with another issue. I was just curious about something I see when I download a package from the NDA website. It looks like the files associated with it download, but instead of the program exiting smoothly, I get an error that says

downloadcmd -dp $1 -d $2 -d $2 -u $3 -p $4

returned with nonzero exit status? All of the variables preceded by a $ sign are my username, password, etc. Is this a known bug that I shouldn't worry about or does it mean that all the files have not downloaded successfully?

Thanks!

John

JBarsotti commented 1 year ago

Just as a follow-up on this, it does look like the download exits frequently due to some kind of lost connection with AWS. I'm not sure if the problem is on your end or my end. My current solution is just continually restarting the download after it gets interrupted.

gregmagdits commented 1 year ago

Hi John, Is there any other information in the error message that is displayed on the screen besides the message that the program exited with a non-zero status?

JBarsotti commented 1 year ago

Hi Greg,

I hope you are well! Happy holidays!

I have attached a text file with the error that gets shown.

John


From: gregmagdits @.> Sent: Wednesday, December 21, 2022 11:05 AM To: NDAR/nda-tools @.> Cc: Barsotti, Ercole @.>; Author @.> Subject: [External] Re: [NDAR/nda-tools] Download Package Bug? (Issue #57)

Hi John, Is there any other information in the error message that is displayed on the screen besides the message that the program exited with a non-zero status?

— Reply to this email directly, view it on GitHubhttps://github.com/NDAR/nda-tools/issues/57#issuecomment-1361678610, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AR5U2T52CGPO3SNCHGEOMWLWOM2FVANCNFSM6AAAAAATD65C2U. You are receiving this because you authored the thread.Message ID: @.***>

Traceback (most recent call last): File "/home/ebarsotti/.local/bin/downloadcmd", line 8, in sys.exit(main()) File "/home/ebarsotti/.local/lib/python3.8/site-packages/NDATools/clientscripts/downloadcmd.py", line 195, in main s3Download.start() File "/home/ebarsotti/.local/lib/python3.8/site-packages/NDATools/Download.py", line 346, in start for package_file_id_list in self.generate_download_batch_file_ids(completed_file_ids): File "/home/ebarsotti/.local/lib/python3.8/site-packages/NDATools/Download.py", line 623, in generate_download_batch_file_ids files = self.get_package_files_by_page(page, self.default_download_batch_size) File "/home/ebarsotti/.local/lib/python3.8/site-packages/NDATools/Download.py", line 1030, in get_package_files_by_page raise e File "/home/ebarsotti/.local/lib/python3.8/site-packages/NDATools/Download.py", line 1019, in get_package_files_by_page tmp = get_request(url, auth=self.auth, File "/home/ebarsotti/.local/lib/python3.8/site-packages/NDATools/Utils.py", line 268, in get_request return _send_prepared_request(req.prepare(), timeout=timeout, deserialize_handler=deserialize_handler, error_handler=error_handler) File "/home/ebarsotti/.local/lib/python3.8/site-packages/NDATools/Utils.py", line 239, in _retry tmp = func(*args, **kwargs) File "/home/ebarsotti/.local/lib/python3.8/site-packages/NDATools/Utils.py", line 262, in _send_prepared_request error_handler(tmp) File "/home/ebarsotti/.local/lib/python3.8/site-packages/NDATools/Utils.py", line 84, in reraise_status response.raise_for_status() File "/home/ebarsotti/.local/lib/python3.8/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 500 Server Error: for url: https://nda.nih.gov/api/package/1208159/files?page=142&size=50

gregmagdits commented 1 year ago

Thanks John. This is a known issue related to a code change that went out recently. We're testing the fix now, so it should be ready to be released soon, although i dont have a specific date yet. I will post an update here when the fix is deployed

JBarsotti commented 1 year ago

Hi Greg,

I think that you all must have fixed the bug! I haven't had any problems downloading today! Happy holidays!

John

gregmagdits commented 1 year ago

Hi John, Yes, the fix was released on Friday. Closing issue.