Https://www.codecademy.com/courses/learn-intermediate-python-3/projects/the-great-robot-race-python-project

I’m at the last step and I do not why in my terminal it raises an error:
$ python3 robot_race.py
Traceback (most recent call last):
File “robot_race.py”, line 1, in
import robot_race_functions as rr
File “/home/ccuser/workspace/the-great-robot-race-python-project-workspace/robot_race_functions.py”, line 59
selected_move = moves[rand.randint(0,3)]
^
IndentationError: unexpected indent

the line at 59 is in the right place… i really do know whats goin on
can someone please help me?

It’s a bit easier to help if we can see what you’re working with. Mind posting your code?

Either way an unexpected indent usually happens when you have a line of code indented too far:

var = 5
  var2 = 3 # unneeded indent

If you think it’s the right place perhaps a problem with tabs versus spaces?

the pproblem is the project about collections
it’s a code not from me but already written in this project… which is a bit weird

You’re saying the projects starting code throws the error for you? It seems to work fine for me :thinking:

Perhaps I edited it in the past though. Could you copy/paste the code you’re working with here? Maybe It’ll catch a difference.

I’ve just reset and paste my previous code… thank you for the support by the way (Y) :)))

1 Like