Web Image Download from CSV file.

Hi,

I ran the script on another computer and it worked fine :confused:

This is what terminal brought back on the machine that doesn’t work

Last login: Tue May 2 09:30:55 on console
JDM10SHA00039:~ leo.eastland$ curl http://jpl.a.bigcontent.io/v1/static/bl_006806_a -o ~/Downloads/Script\ Downloaded\ Images/bl_006806_a
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
Warning: Failed to create the file /Users/leo.eastland/Downloads/Script
Warning: Downloaded Images/bl_006806_a: No such file or directory
curl: (23) Failed writing received data to disk/application

and this is what terminal returned on the machine that the script works on

Last login: Fri Apr 21 18:46:10 on console
JDM11SHA00010:~ capture.station$ curl http://jpl.a.bigcontent.io/v1/static/bl_006806_a -o ~/Downloads/Script\ Downloaded\ Images/bl_006806_a
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
0 3088k 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0Warning: Failed to create the file /Users/capture.station/Downloads/Script
Warning: Downloaded Images/bl_006806_a: No such file or directory
curl: (23) Failed writing body (0 != 11748)

I’ll cross reference the URL text files and see if I can see any anomalies.

Both these terminal responses are reporting failures. Did you have the “Script Downloaded Images” folder that the script makes present in your Downloads folder on both machines when you ran the terminal command? That’s where I left it downloading to.

Alternately, I can just take that out of the path and download directly to your ~/Downloads folder:

Please try that.

Thanks,

Tom.

Sorry my bad tested again here you go

JDM11SHA00010:~ capture.station$ curl http://jpl.a.bigcontent.io/v1/static/bl_006806_a -o ~/Downloads/bl_006806_a
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 3088k 100 3088k 0 0 3519k 0 --:–:-- --:–:-- --:–:-- 3517k

JDM10SHA00039:~ leo.eastland$ curl http://jpl.a.bigcontent.io/v1/static/bl_006806_a -o ~/Downloads/bl_006806_a
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0

OK, well, got me. It worked in the top instance, didn’t work in the bottom instance, and there was no error returned when it didn’t work.

So we’ve ruled out something weird about the Applescript that leads to the command being fed to terminal incorrectly (character encoding, escaping spaces, stuff like that.) Because a valid command fed directly into terminal still doesn’t download the file.

I’m afraid I’m at a loss here for what could be going wrong on the machine where it doesn’t work.

  • Tom.

Yeah I am also at a loss with this, I though it maybe the version of curl but both machines operating exactly the same.