Error when getting "get_state_at_time_step" to convert from OD to CR

Hello,
I am facing a new error when trying to convert from OpenDrive to Commonroad. It seems to be related to traffic lights on the original map. I sent the map to (sebastian.maierhofer@tum.de). This is the error I get:
Any idea of what could it be ?

Traceback (most recent call last):
File “/home/roberto/commonroad-scenario-designer/crdesigner/ui/gui/mwindow/toolboxes/converter_toolbox/map_converter_toolbox.py”, line 42, in run
self.fun()
File “/home/roberto/commonroad-scenario-designer/crdesigner/ui/gui/mwindow/toolboxes/converter_toolbox/map_converter_toolbox.py”, line 316, in convert_open_drive_to_cr
self.callback(self.current_scenario)
File “/home/roberto/commonroad-scenario-designer/crdesigner/ui/gui/mwindow/toolboxes/converter_toolbox/create_converter_toolbox.py”, line 10, in
lambda scenario: toolbox_callback(mwindow, scenario, True),
File “/home/roberto/commonroad-scenario-designer/crdesigner/ui/gui/mwindow/toolboxes/service_layer/general_services.py”, line 8, in toolbox_callback
mwindow.animated_viewer_wrapper.cr_viewer.open_scenario(scenario, new_file_added=new_file_added)
File “/home/roberto/commonroad-scenario-designer/crdesigner/ui/gui/mwindow/animated_viewer_wrapper/commonroad_viewer/animated_viewer.py”, line 112, in open_scenario
self.update_plot(clear_artists=True, new_file_added=new_file_added, plot_limits=plot_limits)
File “/home/roberto/commonroad-scenario-designer/crdesigner/ui/gui/mwindow/animated_viewer_wrapper/commonroad_viewer/animated_viewer.py”, line 269, in update_plot
self.dynamic.draw_scenario(self.current_scenario, self.current_pps, draw_params=draw_params)
File “/home/roberto/commonroad-scenario-designer/crdesigner/ui/gui/mwindow/animated_viewer_wrapper/commonroad_viewer/dynamic_canvas.py”, line 271, in draw_scenario
scenario.draw(renderer=self.rnd, draw_params=draw_params_merged)
File “/home/roberto/commonroad-scenario-designer/venv/lib/python3.10/site-packages/commonroad/scenario/scenario.py”, line 1153, in draw
renderer.draw_scenario(self, draw_params)
File “/home/roberto/commonroad-scenario-designer/venv/lib/python3.10/site-packages/commonroad/visualization/mp_renderer.py”, line 400, in draw_scenario
obj.lanelet_network.draw(self, draw_params.lanelet_network)
File “/home/roberto/commonroad-scenario-designer/venv/lib/python3.10/site-packages/commonroad/scenario/lanelet.py”, line 1816, in draw
renderer.draw_lanelet_network(self, draw_params)
File “/home/roberto/commonroad-scenario-designer/venv/lib/python3.10/site-packages/commonroad/visualization/mp_renderer.py”, line 906, in draw_lanelet_network
center_line_color_dict = collect_center_line_colors(obj, traffic_lights, time_begin)
File “/home/roberto/commonroad-scenario-designer/venv/lib/python3.10/site-packages/commonroad/visualization/util.py”, line 150, in collect_center_line_colors
state = tl.get_state_at_time_step(time_step)
File “/home/roberto/commonroad-scenario-designer/venv/lib/python3.10/site-packages/commonroad/scenario/traffic_light.py”, line 307, in get_state_at_time_step
return self.traffic_light_cycle.get_state_at_time_step(time_step)
AttributeError: ‘NoneType’ object has no attribute ‘get_state_at_time_step’
Aborted (core dumped)

Which version of the scenario-designer are you using?

I believe I am using release v0.7.2. It would be the current version that is in the repo.

I just tried it in an new python environment and for me it worked.

I just created a new python environment using poetry and I get the same error. Did you successfully converted the file Town01.xodr?
if so, is there a way I can update my scenario designer version, maybe I have an older version of some reason. Not sure why is not working on my end.
I always get this warning when converting a file: WARNING:root:Cannot import SUMO, simulation will not be offered in Scenario Designer.
Not sure if has something to do with the error I am getting.

I was able to reproduce the error. The error is related to the GUI. If you use the Python API directly the conversion works:

import os
from commonroad.scenario.scenario import Tag
from commonroad.common.file_writer import CommonRoadFileWriter, OverwriteExistingFile
from commonroad.planning.planning_problem import PlanningProblemSet
from crdesigner.map_conversion.map_conversion_interface import opendrive_to_commonroad
from crdesigner.config.config import OpenDRIVEConversionParams

input_path = "/home/sebastian/Downloads/Town01.xodr"  # replace empty string
config = OpenDRIVEConversionParams()
config.lanelet_types_backwards_compatible = False

scenario = opendrive_to_commonroad(input_path)

writer = CommonRoadFileWriter(
    scenario=scenario,
    planning_problem_set=PlanningProblemSet(),
    author="Sebastian Maierhofer",
    affiliation="Technical University of Munich",
    source="CommonRoad Scenario Designer",
    tags={Tag.URBAN},
)
writer.write_to_file(os.path.dirname(os.path.realpath(__file__)) + "/" + "ZAM_OpenDRIVETest-1_1-T1.xml",
                     OverwriteExistingFile.ALWAYS)

We will fix the GUI error in the next Scenario Designer release.
Sorry for the inconvenience.

Yes after using the API it also worked for me. I do get an error when trying to convert the commonroad version (same map that I just converted from OpenDrive) into lanelet2 tho. I added 2 print statements on the file_reader_xml file to have a closer look and I saw this, the error is also bellow:
XML Node: None
XML Node Type: <class ‘NoneType’>

File “/home/roberto/commonroad-scenario-designer/venv/lib/python3.10/site-packages/commonroad/common/reader/file_reader_xml.py”, line 961, in create_from_xml_node
for cycleElement in xml_node.findall(‘cycleElement’):
AttributeError: ‘NoneType’ object has no attribute ‘findall’

This is a bug caused by a change in commonroad-io. We will fix this in the next release.
Sorry for the inconveniences!

Got it, thank you for the update. Is there a date set up already of when the next release will be out?

probably in the week of 18.09-22.09