Your traci script is importing the wrong traci (from anaconda) which does
not support tracing.
See
https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#determine_the_traci_library_being_loaded

Am Mi., 3. März 2021 um 10:28 Uhr schrieb A Raman <[email protected]>:

> The phenomena persists even with the given route file and without the use
> of --random.
> I tried to get the log file by adding traceFile=<filepath> argument to
> traci.start but I got this error when running my python script:
> TypeError: start() got an unexpected keyword argument 'traceFile'
>
> There could be issues to how I installed sumo so I check with my sumo
> imports in my python script which are:
>
> if 'SUMO_HOME' in os.environ:
>     tools = os.path.join(os.environ['SUMO_HOME'], 'tools')
>     sys.path.append(tools)
> else:
>     sys.exit("please declare environment variable 'SUMO_HOME'")
>
> # sys.path.append('/home/abi/Desktop/hdd/sumo/sumo/tools')
>
> from sumolib import checkBinary  # noqa
> import traci
>
> looking at the output of print(traci.__file__) after the import leads me to 
> my anaconda environment at 
> /anaconda3/envs/envname/lib/python3.7/site-packages/traci/__init__.py where 
> the definition for start is:
>
>  def start(cmd, port=None, numRetries=10, label="default"):
>     """
>     Start a sumo server using cmd, establish a connection to it and
>     store it under the given label. This method is not thread-safe.
>     """
>     if port is None:
>         port = sumolib.miscutils.getFreeSocketPort()
>     sumoProcess = subprocess.Popen(cmd + ["--remote-port", str(port)])
>     _connections[label] = connect(port, numRetries, "localhost", sumoProcess)
>     switch(label)
>     return getVersion()
>
> However digging deeper, I found a start definition in main.py at my 
> '/usr/share/sumo/tools/traci' folder which contains the traceFile argument. 
> So I would like to know if the correct traci is imported here
>
> Thank you
>
>
>
> On Wed, Mar 3, 2021 at 4:15 PM Jakob Erdmann <[email protected]>
> wrote:
>
>> Unfortunately, these items are insufficient to replicate the situation
>> from your screenshot (it shows 4 vehicles wheres the route file only
>> defines 3 vehicles).
>> Also, the use of option "--random" precludes exact reproducibility.
>> - can you provide the complete traci script or alterantively, a log of
>> the issued traci commands? (
>> https://sumo.dlr.de/docs/TraCI/Interfacing_TraCI_from_Python.html#generating_a_log_of_all_traci_commands
>> )
>> - can you provide a --seed value that shows the situation (or reproduce
>> it without the use of --random)?
>>
>> Am Mi., 3. März 2021 um 02:19 Uhr schrieb A Raman <[email protected]
>> >:
>>
>>> Thank you for the response,
>>>
>>> You can find the traffic definition file attached. I did use traci for
>>> my tests and traci.start() is run with the configuration:
>>>
>>> traci.start([
>>> self._sumo_bin,
>>> '-n', self._net,
>>> '-r', self._route,
>>> '--step-length', '0.1',
>>> '--no-warnings', 'true',
>>> '--collision.action', 'warn',
>>> '--collision.check-junctions', 'true',
>>> '--max-depart-delay', '0.2',
>>> '--random', 'true'
>>> ])
>>>
>>>
>>> with the attached files as self._net and self._route
>>>
>>>
>>> On Wed, Mar 3, 2021 at 2:57 AM Jakob Erdmann <[email protected]>
>>> wrote:
>>>
>>>> Please attach the traffic definition (.rou.xml) and post all options
>>>> used to run sumo (or attach the .sumocfg).
>>>> Did you use traci in your test?
>>>>
>>>> Am Di., 2. März 2021 um 13:10 Uhr schrieb A Raman <
>>>> [email protected]>:
>>>>
>>>>> Hello,
>>>>>
>>>>> I found that, while testing intersection behaviours in SUMO in my
>>>>> network, the yellow vehicles in the west-side lane always stop in the
>>>>> intersection area and not at the end of the lane edge. In my attached
>>>>> image, the east-side lane vehicle seems to stop correctly at the edge of
>>>>> the lane at position (8, 2) while the west-side lane vehicles always stop
>>>>> at around (~-4, -2). I tested this by manually entering the blue vehicle
>>>>> into the intersection area and initializing the incoming yellow vehicles 
>>>>> at
>>>>> different times to have ample braking distance once the blue vehicle
>>>>> enters.
>>>>>
>>>>> It doesn't seem like any of the documented reasons for this to happen
>>>>> is the cause so I would like to know what exactly do I need to change so
>>>>> that the bottom lane vehicle stops at the proper position. I've tried
>>>>> changing the stop offset properties for the lane in the network file which
>>>>> does not affect things. The current vehicle type configuration is at
>>>>> default and you can also find my network file attached.
>>>>>
>>>>> Thank you very much in advance
>>>>> _______________________________________________
>>>>> sumo-user mailing list
>>>>> [email protected]
>>>>> To unsubscribe from this list, visit
>>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>>
>>>> _______________________________________________
>>>> sumo-user mailing list
>>>> [email protected]
>>>> To unsubscribe from this list, visit
>>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>>
>>> _______________________________________________
>>> sumo-user mailing list
>>> [email protected]
>>> To unsubscribe from this list, visit
>>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>>
>> _______________________________________________
>> sumo-user mailing list
>> [email protected]
>> To unsubscribe from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> _______________________________________________
> sumo-user mailing list
> [email protected]
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
>
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to