Tutorial not working

Hi!
I have an issue when going through the tutorial of “tum-cps / commonroad-interactive-scenarios · GitLab”.

In point 4, at the following line I get the attached error.
%matplotlib inline
visualize_scenario_with_trajectory(scenario_without_ego, pps)

Error:
File ~/PycharmProjects/commonroad-interactive-scenarios/venv/lib/python3.8/site-packages/commonroad/visualization/mp_renderer.py:397, in MPRenderer.draw_scenario(self, obj, draw_params)
391 “”"
392 :param obj: object to be plotted
393 :param draw_params: optional parameters for plotting, overriding the parameters of the renderer
394 :return: None
395 “”"
396 draw_params = draw_params or self.draw_params
→ 397 obj.lanelet_network.draw(self, draw_params.lanelet_network)
398 obs = obj.obstacles
399 # Draw all objects

AttributeError: ‘dict’ object has no attribute ‘lanelet_network’

Thanks for your help!
Best,
Rudolf

Hello Rudolf,

Thanks for reporting this bug. It was caused by changes in the commonroad-io API, which had not been applied for the interactive scenarios repo. It is fixed now, and you can pull the new version of the repo.

Best regards,
Florian

1 Like

Thank you very much!

1 Like