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

TypeError: slice indices must be integers or None or have an __index__ method #52

Open
fenfeibani opened this issue Oct 1, 2017 · 1 comment

Comments

@fenfeibani
Copy link

when i run " ./view_steering_model.py ./outputs/steering_model/steering_angle.json", it prompt me this error message:
Traceback (most recent call last):
File "./view_steering_model.py", line 120, in
draw_path_on(img, speed_ms, -angle_steers/10.0)
File "./view_steering_model.py", line 84, in draw_path_on
draw_path(img, path_x, path_y, color)
File "./view_steering_model.py", line 59, in draw_path
draw_pt(img, x, y, color)
File "./view_steering_model.py", line 55, in draw_pt
img[row-sz:row+sz, col-sz:col+sz] = color
TypeError: slice indices must be integers or None or have an index method
How to solve this problem?

@riyadhlewis
Copy link

Hello,
I just got into that problem.
use
img[int(row-sz):int(row+sz), int(col-sz):int(col+sz)] = color

it should work

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

2 participants