I would like to write a python script to connect and exchange data in Gridlabd su http connection.
I thought this should be done by letting Gridlabd run in server mode.
But I always get an error HTTP/1.1 404 NOT FOUND.
I thought the problem should be that I didn't access to the resources correctly.
What is the way to access the resources.
If I want to exchange the data between a python script and GLD, how can I do that?
Thank you very much indeed.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, obviously that's not supposed to happen, but I'm unable to reproduce the problem with the information you've provided. Here are some suggestions to help diagnose the problem.
1) Post the command lines you use to start both gridlabd and python.
2) Try running gridlabd with --verbose and/or --debug options to get more information on what is happening.
3) Upload dumps of the outputs from python and gridlabd.
One thing that kind of jumps out looking at the code is the body of the request in python doesn't look right to me. Maybe it's something about how conn.request() works, but the leading and trailing "***" won't work for GridLAB-D's server. The formatting requirements for the query string are quite specific and it doesn't look like the query satisfies them. See http://gridlabd.me.uvic.ca/wiki/index.php/Realtime_server for details on the query formats that are supported.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear all,
I would like to write a python script to connect and exchange data in Gridlabd su http connection.
I thought this should be done by letting Gridlabd run in server mode.
But I always get an error HTTP/1.1 404 NOT FOUND.
I thought the problem should be that I didn't access to the resources correctly.
What is the way to access the resources.
If I want to exchange the data between a python script and GLD, how can I do that?
Thank you very much indeed.
Here attached my code
Well, obviously that's not supposed to happen, but I'm unable to reproduce the problem with the information you've provided. Here are some suggestions to help diagnose the problem.
1) Post the command lines you use to start both gridlabd and python.
2) Try running gridlabd with --verbose and/or --debug options to get more information on what is happening.
3) Upload dumps of the outputs from python and gridlabd.
One thing that kind of jumps out looking at the code is the body of the request in python doesn't look right to me. Maybe it's something about how conn.request() works, but the leading and trailing "***" won't work for GridLAB-D's server. The formatting requirements for the query string are quite specific and it doesn't look like the query satisfies them. See http://gridlabd.me.uvic.ca/wiki/index.php/Realtime_server for details on the query formats that are supported.