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

Error when downloading data: ftplib.error_perm: 550 #2

Open
JPPereira93 opened this issue Jul 3, 2023 · 5 comments
Open

Error when downloading data: ftplib.error_perm: 550 #2

JPPereira93 opened this issue Jul 3, 2023 · 5 comments

Comments

@JPPereira93
Copy link

Hello!

I installed the merge-downloader toolbox however I get a error as such:

Downloading INPETypes.DAILY_RAIN series for range: ['01-06-2023', '10-06-2023']
Traceback (most recent call last):
File "C:\Users\JoaoPereira\AppData\Local\Programs\Python\Python310\Scripts\merge-downloader-script.py", line 33, in
sys.exit(load_entry_point('merge-downloader', 'console_scripts', 'merge-downloader')())
File "c:\users\joaopereira\desktop\merge-downloader\mergedownloader\cli.py", line 281, in main
args.func(args)
File "c:\users\joaopereira\desktop\merge-downloader\mergedownloader\cli.py", line 159, in download
files = downloader.get_range(
File "c:\users\joaopereira\desktop\merge-downloader\mergedownloader\downloader.py", line 291, in get_range
return parser.get_range(
File "c:\users\joaopereira\desktop\merge-downloader\mergedownloader\parser.py", line 305, in get_range
return self.get_files(
File "c:\users\joaopereira\desktop\merge-downloader\mergedownloader\parser.py", line 281, in get_files
self.get_file(
File "c:\users\joaopereira\desktop\merge-downloader\mergedownloader\parser.py", line 243, in get_file
return self.download_file(date=date, local_folder=local_folder, **kwargs)
File "c:\users\joaopereira\desktop\merge-downloader\mergedownloader\parser.py", line 180, in download_file
downloaded_file = self.ftp.download_ftp_file(
File "c:\users\joaopereira\desktop\merge-downloader\mergedownloader\utils.py", line 257, in download_ftp_file
remote_time_str = ftp.sendcmd("MDTM " + remote_file)
File "C:\Users\JoaoPereira\AppData\Local\Programs\Python\Python310\lib\ftplib.py", line 281, in sendcmd
return self.getresp()
File "C:\Users\JoaoPereira\AppData\Local\Programs\Python\Python310\lib\ftplib.py", line 254, in getresp
raise error_perm(resp)
ftplib.error_perm: 550 /modelos/tempo/MERGE/GPM/DAILY\2023/06\MERGE_CPTEC_20230601.grib2: No such file or directory

I checked and I have all the required packages, any idea how to fix this?

Thank you

@cordmaur
Copy link
Owner

cordmaur commented Jul 3, 2023

Hi João, inside the downloads folder there is a .log file. Can you share here the last lines please?
Additionally, let me know which is the OS of the downloads folder. We had a similar issue when writing to a corporative storage, and the error occurred when trying to change the datetime of the downloaded file (it seems some OSs don't accept the command).

@JPPereira93
Copy link
Author

[20230703-103907:ERROR:FTPUtil] Attempt 1 failed with error <class 'ftplib.error_perm'>: 550 /modelos/tempo/MERGE/GPM/DAILY\2023/06\MERGE_CPTEC_20230601.grib2: No such file or directory
[20230703-103907:ERROR:FTPUtil] Opening a new connection
[20230703-103908:ERROR:FTPUtil] Attempt 2 failed with error <class 'ftplib.error_perm'>: 550 /modelos/tempo/MERGE/GPM/DAILY\2023/06\MERGE_CPTEC_20230601.grib2: No such file or directory
[20230703-103908:ERROR:FTPUtil] Opening a new connection
[20230703-103910:ERROR:FTPUtil] Attempt 3 failed with error <class 'ftplib.error_perm'>: 550 /modelos/tempo/MERGE/GPM/DAILY\2023/06\MERGE_CPTEC_20230601.grib2: No such file or directory
[20230703-103910:ERROR:FTPUtil] Opening a new connection
[20230703-103912:ERROR:FTPUtil] Attempt 4 failed with error <class 'ftplib.error_perm'>: 550 /modelos/tempo/MERGE/GPM/DAILY\2023/06\MERGE_CPTEC_20230601.grib2: No such file or directory
[20230703-103912:ERROR:FTPUtil] Opening a new connection
[20230703-103914:ERROR:FTPUtil] Attempt 5 failed with error <class 'ftplib.error_perm'>: 550 /modelos/tempo/MERGE/GPM/DAILY\2023/06\MERGE_CPTEC_20230601.grib2: No such file or directory
[20230703-103914:ERROR:FTPUtil] Opening a new connection

My OS is windows 11 pro

@cordmaur
Copy link
Owner

cordmaur commented Jul 3, 2023

It seems a problem with the slashes (forward vs back slashes) in the posix path /modelos/tempo/MERGE/GPM/DAILY\2023/06\MERGE_CPTEC_20230601.grib2:
I'll have to debug it on a windows machine, but I will update it soon...

@JPPereira93
Copy link
Author

I've been using WSL to surpasse that windows limitation but now i have this timeout error:

image

cordmaur added a commit that referenced this issue Jul 24, 2023
cordmaur added a commit that referenced this issue Jul 24, 2023
cordmaur added a commit that referenced this issue Jul 24, 2023
@cordmaur
Copy link
Owner

@JPPereira93 , both issues have been solved in the new release 0.0.3. Besides the "windows" issue with the Path, last week the FTP server stopped from responding. Now I've added an option (set as default) to download it directly through HTTP protocol.
Pip version is already updated. Let me know if everthing goes fine to close this issue.

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

2 participants