`NoneType` object has no attribute `querry`

When I click the mpl canvas to choose a lanelet I just added, this error occurs. It seems that self._buffered_street was not initialized properly.

    self._buffered_strtee.query(shape.shapely_object) if
AttributeError: 'NoneType' object has no attribute 'query'

I just tried to add a lanelet and click on it, but for me everything works fine.
Can you provide all list of required actions to perform so that I can reconstruct the error locally?

Hi, thx for replying. What I did is as following:

  1. run crdesigner gui in console, then in gui
  2. click new CR file
  3. in Toolbox-Lanelet, click add
  4. click connect to previously added
  5. click add
  6. click add
  7. Then, click canvas to choose a lanelet. Error occurs.

Following is my common-road related pkgs’ version:

commonroad-drivability-checker 2021.1
commonroad-io                  2021.3
commonroad-route-planner       1.0.0
commonroad-scenario-designer   0.2
commonroad-vehicle-models      2.0.0

Please pull and install the latest version of the scenario designer (version 0.3).

Same Problem. Updating scenario designer from 0.2 → 0.3 didn’t resolve it.

It seems that self._create_buffered_strtree() was not called when I add a new lanelet.

This is a bug in commonroad-io which we already solved in our internal repository.
We will update the public commonroad-io version next week.
Then, this problem should be fixed.

Okay. It seems that the following __deepcopy__ has an issue with self._buffered_street=None.

    def __deepcopy__(self, memo):
        cls = self.__class__
        result = cls.__new__(cls)
        print("deecopy occurs! _buffered_strtee is reset to None")
        self._buffered_strtee = None
        memo[id(self)] = result
        for k, v in self.__dict__.items():
            setattr(result, k, copy.deepcopy(v, memo))

        result._create_buffered_strtree()

        return result

As I’m testing cr-scenario-creation, any work-around method can you provide? Deleting self._buffered_street=None will introduce other issues, from what I see. If no method can be provided, I’ll wait next week. Thx.

Unfortunately, the bug-fix requires several changes.
We will publish the new commonroad-io version as soon as possible.

Hi, sebastian. Any update on commonroad-io?

commonroad-io 2021.4 is now published. This version should fix the error.