Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'id' #38

Open
Ludadiesel opened this issue Nov 8, 2024 · 0 comments
Open

AttributeError: 'NoneType' object has no attribute 'id' #38

Ludadiesel opened this issue Nov 8, 2024 · 0 comments

Comments

@Ludadiesel
Copy link

I also tried "python ModelExample.py" with ['roundabout'] then got a AttributeError.

AttributeError: 'NoneType' object has no attribute 'id'

After a few seconds next_lane is NONE

self.lane_id E9_0
next_lane.id :J13_3_0
self.lane_id E11_0
next_lane.id :J14_0_0
self.lane_id E9_0
next_lane.id :J13_6_0
next_lane is NONE
self.lane_id E9_1

LimSim/trafficManager/common/vehicle.py", line 252, in update_behaviour
print(f"next_lane.id {next_lane.id}")
AttributeError: 'NoneType' object has no attribute 'id'
Error: tcpip::Socket::recvAndCheck @ recv: peer shutdown36 ACT 24 BUF 0)
Quitting (on error).

in junction behaviour

    if self.current_state.s > current_lane.course_spline.s[-1] - 0.2:
        if isinstance(current_lane, NormalLane):
            next_lane = roadgraph.get_available_next_lane(
                current_lane.id, self.available_lanes)
           
            if next_lane is None:
                print('next_lane is NONE')
            print(f"self.lane_id {self.lane_id}")
            print(f"next_lane.id {next_lane.id}")

            self.lane_id = next_lane.id
            self.current_state = self.get_state_in_lane(next_lane)
            current_lane = next_lane
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant