bugGNU Octave - Bugs: bug #63851, mget function returns : file not...

 
 

bug #63851: mget function returns : file not found

Submitter:  None
Submitted:  Wed 01 Mar 2023 04:02:33 AM UTC
   
 
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Mathieu Nadeau Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 7.3.0
Operating System:  * Microsoft Windows Fixed Release:  8.2.0
Planned Release:  8.2.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Fri 31 Mar 2023 12:52:11 PM UTC, comment #13: 

I tested with octave-2023-03-29-21-40-release-w64 from buildbot.octave.space on Windows 11.
It seems to be working correctly:

>> f = ftp('ftp.gnu.org')
f =

  FTP object
    host: ftp.gnu.org
    user: anonymous
     dir: /
    mode: binary

>> x = dir(f)
x =

  19x1 struct array containing the fields:

    name
    date
    bytes
    isdir
    datenum

>> uint8(x(1).name)
ans =

  67  82  89  80  84  79  46  82  69  65  68  77  69

>> mget(f,"welcome.msg")
>> system('cat welcome.msg')
NOTICE (Updated October 15 2021):

If you maintain scripts used to access ftp.gnu.org over FTP,
we strongly encourage you to change them to use HTTPS instead.

Eventually we hope to shut down FTP protocol access, but plan
to give notice here and other places for several months ahead
of time.

--

If you have any problems with the GNU software or its downloading,
please refer your questions to <gnu@gnu.org>.

There are several mirrors of this archive, a complete list can be
found on http://www.gnu.org/order/ftp.html.  You might want to use a
mirror closer to you.

Non-GNU programs that were formerly in gnu/ have moved to gnu/non-gnu/.
Most of them were just pointers in the format program.README.  If you
are looking for such a file, be sure to check gnu/non-gnu/.

Archives of the GNU mailing lists can be accessed or downloaded
via the web from http://mail.gnu.org; they are no longer available
by ftp.

The FSF provides this archive as a service to GNU users.  Please
consider donating to the FSF at http://donate.fsf.org/ or becoming an
Associate Member at http://member.fsf.org/.
ans = 0
>>


Thanks again for the patch.

Closing as fixed.

Markus Mützel <mmuetzel>
Group administrator
Tue 28 Mar 2023 02:11:53 PM UTC, comment #12: 

The patch looks good to me. I pushed a slightly modified version with you as the author to the stable branch here:
https://hg.savannah.gnu.org/hgweb/octave/rev/7faaf2c6aaec

It will be part of the next stable release of Octave (version 8.2.0). Or you could check the changes by using a nightly build from tomorrow or later that should become available here:
https://buildbot.octave.space/#/download

Markus Mützel <mmuetzel>
Group administrator
Mon 27 Mar 2023 11:39:11 AM UTC, comment #11: 

The source code needs the patch applied and then octave recompiled.

John Donoghue <lostbard>
Group Member
Sat 25 Mar 2023 04:11:53 PM UTC, comment #10: 

Hi John,
Thanks for the information.
How can I install this patch ?
Regards,

Mathieu

Anonymous
Fri 24 Mar 2023 07:24:22 PM UTC, comment #9: 

This fixes it for me



(file #54524)

John Donoghue <lostbard>
Group Member
Mon 20 Mar 2023 09:37:55 PM UTC, comment #8: 

Hi John,
I confirm that windows effectively adds '\r'.
I'm an experienced Matlab user, but relatively new to Octave.
Please let me know if I can provide any help.

Regards,

Mathieu

Anonymous
Mon 13 Mar 2023 02:54:29 PM UTC, comment #7: 

So running some more tests and the list function is adding (or leaving '\r') in windows, but not in linux.


Linux:


octave:1> f = ftp('ftp.gnu.org')
f =

  FTP object
    host: ftp.gnu.org
    user: anonymous
     dir: /
    mode: binary

octave:2> x = dir(f)
x =

  19x1 struct array containing the fields:

    name
    date
    bytes
    isdir
    datenum

octave:3> uint8(x(1).name)
ans =

  67  82  89  80  84  79  46  82  69  65  68  77  69


In windows:


octave:3> uint8(x(1).name)
ans =

  67  82  89  80  84  79  46  82  69  65  68  77  69 13



John Donoghue <lostbard>
Group Member
Thu 09 Mar 2023 04:21:57 PM UTC, comment #6: 

Im guessing pattern.match in libinterp/corefcn/__ftp__.cc is failing to match names currectly in windows, but have not looked further to verify

John Donoghue <lostbard>
Group Member
Thu 09 Mar 2023 04:05:36 PM UTC, comment #5: 

help _ftp_mget_ works

_ftp_mget_(f,'') # expected to fail - shows same cant find message

John Donoghue <lostbard>
Group Member
Thu 09 Mar 2023 03:58:26 PM UTC, comment #4: 

I tried in 7.3 and in 8.1 and see the same error in windows

dir(f) etc appears to work ok

John Donoghue <lostbard>
Group Member
Wed 08 Mar 2023 01:03:58 AM UTC, comment #3: 

Thank you for your comments.
Octave was downloaded from https://octave.org/download.html
The application was started in gui mode.
Should I try to install an earlier release?
Regards,
Mat

Anonymous
Tue 07 Mar 2023 07:12:37 PM UTC, comment #2: 

assuming windows, how was octave installed, and how was the octave application started?

John Donoghue <lostbard>
Group Member
Thu 02 Mar 2023 05:39:31 AM UTC, comment #1: 

Works for me with 7.3 on Linux.  This might be a Windows-specific problem.

Rik <rik5>
Group administrator
Wed 01 Mar 2023 04:02:33 AM UTC, original submission:  

mget function cannot find the remote file. dir and mput functions work properly.

This simple example doesn't work :

>> f = ftp ("ftp.gnu.org")

f =

  FTP object
    host: ftp.gnu.org
    user: anonymous
     dir: /
    mode: binary

>> mget(f,"welcome.msg")

error: _ftp_mget_: file not found
error: called from
    mget at line 44 column 3

>>


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #54524:  bug63851.patch added by lostbard (1018B - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by mmuetzel (Posted a comment)
  • -email is unavailable- added by lostbard (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-03-31 mmuetzel StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2023-03-28 mmuetzel Fixed ReleaseNone 8.2.0
        Planned ReleaseNone 8.2.0
    2023-03-24 lostbard Attached File- Added bug63851.patch, #54524
        StatusNone Patch Submitted
    2023-03-02 rik5 Carbon-CopyRemoved 72865 -
    2023-03-02 rik5 Summarymget function returns : file note found mget function returns : file not found

    Back to the top

    Powered by Savane 3.13-7c56.
    Corresponding source code