SimpleAuto has no attribute schedule()


I am newer to python and I keep getting this error when trying to schedule my autonomous command. Am I missing an import or a class ___ extends ___ as we would call it in Java?

Thanks in advance!

First image is cmd, second is the auto being “scheduled,” third and fourth are robotpy. Also, the fourth starts within robotinit().

In the future, I don’t recommend posting screenshots. It would be better to push your code to github, or copy/paste the individual files here (surrounded by ```).

Either way, the error message tells you all that you need to know:

AttributeError: module 'firstAuto' has no attribute 'schedule'

firstAuto is a python module, not a Command. So it won’t work.

You didn’t show the entirety of your, but I’m guessing at the top you have a import firstAuto statement, which makes firstAuto a module (not an instance of your autonomous command). On line 68, you have self.firstAuto = firstAuto, and on line 70 you add that to the SendableChooser.

To fix it, you should change line 68 to be self.firstAuto = firstAuto.FirstAuto()

1 Like

haha, python is so strange. Thanks again!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.