NrgXnat / oasis-scripts

Example download scripts for the OASIS3 project
132 stars 46 forks source link

"Could not download all scans" #26

Closed Chad1921 closed 2 years ago

Chad1921 commented 2 years ago

Hello,

Thank you very much for making these scripts available. Unfortunately, it is not working for me just yet , so I would really appreciate help this.

I am trying to download using the unedited oasis_scan_download_example.csv file initially, but zero files are downloaded. I'm using "download_oasis_scans.sh" and I get the following output (below).

I've also tried with "download_oasis_scans_tar.sh" and got the same output. I'm using Ubuntu 18.04.6.

Any advice, please? Many thanks

Downloading all scans for OAS30001_MR_d0129. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 298 100 298 0 0 622 0 --:--:-- --:--:-- --:--:-- 622 Could not download all scans for OAS30001_MR_d0129. Done with OAS30001_MR_d0129. Downloading all scans for OAS30001_MR_d0757. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 298 100 298 0 0 643 0 --:--:-- --:--:-- --:--:-- 642 Could not download all scans for OAS30001_MR_d0757. Done with OAS30001_MR_d0757. Downloading all scans for OAS30001_MR_d2430. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 298 100 298 0 0 630 0 --:--:-- --:--:-- --:--:-- 630 Could not download all scans for OAS30001_MR_d2430. Done with OAS30001_MR_d2430. HTTP/1.1 200 OK Set-Cookie: JSESSIONID=central.xnat.org3~4DCD4E65301968E4C02240850A579A11; Path=/; HttpOnly Set-Cookie: SESSION_EXPIRATION_TIME="1661246975428,900000"; Version=1; Path=/ Date: Tue, 23 Aug 2022 09:29:35 GMT Accept-Ranges: bytes Server: Noelios-Restlet-Engine/1.1.10 X-Content-Type-Options: nosniff X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN Content-Security-Policy: frame-ancestors 'self' Content-Length: 0

sarahkeefe commented 2 years ago

Hi, can you send me the command you ran? A screenshot rather than a copy-paste may be more helpful.

This issue is also what happens if you mis-type your username or password, so ensure you are using the correct username and password when running the script. Make sure you can log in to https://central.xnat.org with the username/password combination you are using in the script and make sure you have access to the XNAT Central OASIS3 project with that username.

Chad1921 commented 2 years ago

Hi, many thanks for your advice - it was a password issue. I can now download using the example .csv file.

However, when I try to download a few PET images (test.csv), I'm getting "curl: (3) Illegal characters found in URL". Please see the attached files. I made the (test).csv file on a Windows machine in using Excel and Notepad, as per the instructions.

Alternatively, I tried opening the example .csv file in Notepad and replacing the labels with a PET label (test2.csv), saving as per the instructions. The illegal characters message did not appear on running, but no files were downloaded.

Any ideas, please? Many thanks for your time

test.csv test_screenshot test2.csv test2_screenshot

sarahkeefe commented 2 years ago

Seeing the '\r' is an indicator that the file is not in Unix format. Check and make sure you followed the instructions or use an alternative method of converting to Unix format. Going to close this issue as it is not an issue with the script.