behavioral-ds/evently

AMPL autoinstall fails

andrei-rizoiu opened this issue · 6 comments

Starts off promising, then errors out.


This package requires AMPL and ipopt
But they are not in your PATH environment.
Please specify its binary folder path in ~/.Renviron
Please also make sure the ipopt binary is in the
same folder.


It seems AMPL is not found in your PATH environment, do you want to install it now?

1: yes
2: no

Selection: 1
Enter the path where AMPL should be place [/shared/homes/142507]:
trying URL 'https://ampl.com/demo/ampl.linux64.tgz'
Content type 'application/x-gzip' length 136008439 bytes (129.7 MB)

downloaded 30.9 MB

Error: package or namespace load failed for ‘evently’:
.onAttach failed in attachNamespace() for 'evently', details:
call: download.file(ampl_download_url, destfile = "/tmp/ampl.tgz")
error: download from 'https://ampl.com/demo/ampl.linux64.tgz' failed
In addition: Warning messages:
1: In download.file(ampl_download_url, destfile = "/tmp/ampl.tgz") :
downloaded length 32407552 != reported length 136008439
2: In download.file(ampl_download_url, destfile = "/tmp/ampl.tgz") :
URL 'https://ampl.com/demo/ampl.linux64.tgz': Timeout of 60 seconds was reached

Hi Andrei, thanks for the bug report. It seems the file downloading failed, I'll probably add a better error handling to retry downloading again.

Seems to be a problem of download.file and cURL on that machine. This fails:
download.file("https://ampl.com/demo/ampl.linux64.tgz", destfile = "/tmp/ampl.tgz")

but switching to wget succeeds:
download.file("https://ampl.com/demo/ampl.linux64.tgz", destfile = "/tmp/ampl.tgz", method = "wget")

I can reproduce the bug on another linux machine using Ubuntu 20.04, the previous one was using Centos8.

i see, I'll retry downloading with wget in an error handling then.

This is hopefully fixed by the recent commit. Closing the issue for now.

Unfortunately, the bug is still present.

It seems AMPL is not found in your PATH environment, do you want to install it now?

1: yes
2: no

Selection: 1
Enter the path where AMPL should be place [/home/andrei]: 
trying URL 'https://ampl.com/demo/ampl.linux64.tgz'
Content type 'application/x-gzip' length 136008439 bytes (129.7 MB)
==============
downloaded 36.6 MB

Error: package or namespace load failed for ‘evently’:
 .onAttach failed in attachNamespace() for 'evently', details:
  call: download_file(ampl_download_url, destfile = "/tmp/ampl.tgz")
  error: object 'status' not found
In addition: Warning messages:
1: In download.file(url, destfile = destfile) :
  downloaded length 38420480 != reported length 136008439
2: In download.file(url, destfile = destfile) :
  URL 'https://ampl.com/demo/ampl.linux64.tgz': Timeout of 60 seconds was reached