Cannot run hs71.m test file after installing localhost

26 views
Skip to first unread message

Arun Kumar Kantheti

unread,
Aug 11, 2022, 8:06:52 AM8/11/22
to apmonitor
Hello there!
I followed the videos and installed localhost. I am able to load ip.php from 127.0.0.1. However, when I run hs71.m test MATLAB file I get the following error about url. Could someone please help me resolve this?

Response stream is undefined
 below is a Java Error dump (truncated):
Error using urlread
The value of 'url' is invalid. Expected input to be one of these types:

char

Instead its type was java.net.URL.

Error in urlreadwrite>parseInputs (line 141)
p.parse(args{:})

Error in urlreadwrite (line 10)
inputs = parseInputs(fcn,varargin);

Error in urlread (line 47)
[s,status] = urlreadwrite(mfilename,catchErrors,url,varargin{:});

Error in urlread_apm (line 51)
    output = urlread(url);

Error in apm (line 31)
    response = urlread_apm(url);

Error in hs71 (line 10)
apm(s,a,'clear all');


Thank you.
Best regards,

John Hedengren

unread,
Aug 11, 2022, 8:15:36 AM8/11/22
to apmo...@googlegroups.com
Arun,

It looks like you have the APMonitor server installed correctly with the IP test. Try using s=“http://127.0.0.1” or else “http://localhost”. Also, could you share the version of Matlab that you are using? Some of the early versions don’t support the http remote calls.

If you need to solve locally, one of the easiest ways that don’t use an Apache server is with Python Gekko: 

John

--
--
APMonitor user's group e-mail list.
- To post a message, send email to apmo...@googlegroups.com
- To unsubscribe, send email to apmonitor+...@googlegroups.com
- Visit this group at http://groups.google.com/group/apmonitor
---
You received this message because you are subscribed to the Google Groups "apmonitor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apmonitor+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/apmonitor/4172ea0d-fdb1-4974-8d31-16b944eea644n%40googlegroups.com.
--
Best regards,

John Hedengren
GEKKO Optimization Suite
Reply all
Reply to author
Forward
0 new messages