Hello,

I launch TraCI via python runner.py and, whereas it stops in the first recv it 
finds, the socket method “connect” works (line 465, file track/__init__.py):

_connections[label].connect((host, port))

… OMG!! I’ve realized what was the error. As usual, it’s an usersaurus error. I 
didn’t know I had to click “start” to start the simulation. I thought that 
starting the simulation with TraCI would have do the same with the simulator.

Thank you for your time, Jakob. Have a nice day,

Alberto


> On Apr 28, 2015, at 10:30 AM, Jakob Erdmann <[email protected]> 
> wrote:
> 
> Hello,
> I'm unfamiliar with this error case. 
> recv() might hang due to some firewall dropping packets.
> Theoretically the error might also occur if SUMO doesn't talk to the client 
> as it should. What is the state of the GUI while the runner hangs?
> 
> 2015-04-28 10:03 GMT+02:00 Alberto Díaz <[email protected] 
> <mailto:[email protected]>>:
> Hello Jacob,
> 
> Unfortunately it didn’t work. When address:port is in use it fails loudly (a 
> red message in SUMO). I’ve tried some other ports and still hangs. Launching 
> it with —trace option:
> 
> …
> lots of stuff
> …
> __init__.py(466):             break
> __init__.py(469):     return getVersion()
>  --- modulename: __init__, funcname: getVersion
> __init__.py(491):     command = constants.CMD_GETVERSION
> __init__.py(492):     _message.queue.append(command)
> __init__.py(493):     _message.string += struct.pack("!BB", 1 + 1, command)
> __init__.py(494):     result = _sendExact()
>  --- modulename: __init__, funcname: _sendExact
> __init__.py(289):     if _embedded:
> __init__.py(292):         length = struct.pack("!i", len(_message.string) + 4)
> __init__.py(293):         _connections[""].send(length + _message.string)
> __init__.py(294):         result = _recvExact()
>  --- modulename: __init__, funcname: _recvExact
> __init__.py(269):     try:
> __init__.py(270):         result = ""
> __init__.py(271):         while len(result) < 4:
> __init__.py(272):             t = _connections[""].recv(4 - len(result))
> 
> Here is where the program hangs and my heart breaks in two. Thanks,
> 
> Alberto
> 
>> On Apr 28, 2015, at 9:50 AM, Jakob Erdmann <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Hello,
>> possibly the port is in use. Try using a different value for PORT in 
>> runner.py line 42
>> regards,
>> Jakob
>> 
>> 2015-04-28 9:12 GMT+02:00 Alberto Díaz <[email protected] 
>> <mailto:[email protected]>>:
>> Hi all,
>> 
>> I’ve been trying to connect SUMO server from a python script using TraCI 
>> (the tutorial of traffic lights located in 
>> http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights 
>> <http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights> 
>> <http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights 
>> <http://sumo.dlr.de/wiki/Tutorials/TraCI4Traffic_Lights>>). The problem is 
>> TraCI hangs while receiving data from sumo, in line 272 of track/__init__.py:
>> 
>> …
>> t = _connections[""].recv(4 - len(result))
>> …
>> 
>> I don’t know where else look, but I’m sure somebody has suffered this 
>> problem before and I’s like to know if it’s related to the system where is 
>> installed (OS X Yosemite), the environment (python 2.7.9) or a known bug in 
>> SUMO (haven’t found any information about ir, so I don’t think so).
>> 
>> Thank you very much in advance. Have a nice day,
>> 
>> Alberto
>> ------------------------------------------------------------------------------
>> One dashboard for servers and applications across Physical-Virtual-Cloud
>> Widest out-of-the-box monitoring support with 50+ applications
>> Performance metrics, stats and reports that give you Actionable Insights
>> Deep dive visibility with transaction tracing using APM Insight.
>> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y 
>> <http://ad.doubleclick.net/ddm/clk/290420510;117567292;y>
>> _______________________________________________
>> sumo-user mailing list
>> [email protected] <mailto:[email protected]>
>> https://lists.sourceforge.net/lists/listinfo/sumo-user 
>> <https://lists.sourceforge.net/lists/listinfo/sumo-user>
>> 
> 
> 

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
sumo-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sumo-user

Reply via email to