필터 지우기
필터 지우기

Trapping mget FTP errors

조회 수: 2 (최근 30일)
AMM
AMM 2020년 7월 29일
댓글: Zhigang Xu 2021년 6월 24일
Trying to pull data from an FTP site using mget. Occasionally this fails, but unless I put a breakpoint at the exact mget call, and then step through with the debugger [1], it fails silently: I only get an error when the calling script tries to reference the missing (local) target folder, which mget is supposed to create if it doesn't exist. I don't see the FTP error itself.
I first tried installing this add-on to see if it would help to use FTP "pasv" mode. But based on the comments in its contents, it seems to be much older than my version of MATLAB (I'm on 2020a). At the risk of sounding obtuse, has this add-on's functionality been integrated into MATLAB by now, or does it still add something useful? How might I check?
Also, I found this recent discussion and specifically IA's solution of using a try/catch block, since mget does not have output arguments to examine. Is this the recommended/preferred way to trap mget errors?
Thanks,
-AMM
[1] Perhaps I'm misunderstanding how the debugger works with OOP classes/methods/etc. — I haven't worked with Matlab's OOP functionality before. But the fact that my code silently runs right past those FTP errors without printing anything to the Command Window is unexpected.
  댓글 수: 1
Zhigang Xu
Zhigang Xu 2021년 6월 24일
I have a similar problem: mget often hangs up in ftpping data from a host site. It works well sometimes and sometimes does not. Have you solved your problem? Tips? --- Zhigang

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 FTP File Operations에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by