|
From: | Patrick Pintelon |
Subject: | I cannot write a URL (for download): urlwrite: unable to open file` / Octave hangs when doing it in code with variabels. |
Date: | Sat, 29 Feb 2020 13:00:56 +0100 |
User-agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
Hello,
Version5.2.0 Octave: I cannot writea URL (for download). I use W10 and Edge.
`>> [f, success, message] = urlread('https://static.stooq.com/db/h/d_macro_txt.zip')
>> [f, success, message] = urlwrite('https://static.stooq.com/db/h/d_macro_txt.zip','d:\')
error: urlwrite: unable to open file`
The url exists and I can download it with Edge.
The file do be downloaded is NOT already opened;
I have also tried with urlread (with a txt file) and this is
OK to read; Then I can save the 'read-file-variable' to disk with
the save command and I can read it with notepad.
This doesn't succeed with a .zip file: in that case, I can
also save it but I cannot unzip. This gives 'archive not
readable'. The String must be corrupted.
When I download the same .zip file in a browser, I can unzip.
I also tried to do the same in code:
[sss,success,message]= urlread
(url(urlTel){:});
save(dwnDir(urlTel){:},sss);
where:
debug> url(urlTel){:}
ans = https://static.stooq.com/db/h/d_world_txt.zip
debug> class(url(urlTel){:})
ans = char
debug> dwnDir(urlTel){:}
ans = D:/DATA-MEDION/beurs/AutoDownBeurs/stooqDwn/h/d_world/
debug> class(dwnDir(urlTel){:})
ans = char
and now Octave GUI hangs at the first code line without any message and before I can save it. Have to go to task manager to restart Octave.
Any ideas?
Many Thanks
--
[Prev in Thread] | Current Thread | [Next in Thread] |