udacity / fcnd-issue-reports

You can use this repository to file issue reports with the Flying Car Nanodegree content.
1 stars 4 forks source link

When run from command line errors from connection object cause crash #393

Open EngrStudent opened 3 years ago

EngrStudent commented 3 years ago

I'm trying to run this from the command line. It works as expected in the IDE, but I want to not have the IDE overhead.

This is the normal text output of the controller

starting connection
arming transition
takeoff transition
waypoint transition

Then an error occurs:

Traceback (most recent call last):
  File "...\Anaconda3\envs\fcnd\lib\site-packages\udacidrone\connection\connection.py", line 88, in notify_message_listeners
    fn(name, msg)
  File "...\Anaconda3\envs\fcnd\lib\site-packages\udacidrone\drone.py", line 117, in on_message_receive
    if (((msg.time - self._message_time) > 0.0)):
AttributeError: 'int' object has no attribute 'time'

SO attributes this error, as described here, as overwriting a library time object with a declared constant. They say that you declare something like

time = 3

and then try to use the time library as

time.time

which has been made meaningless.

I don't know if this is your actual problem, but it seems there is an actual problem in the code, when called from the command line.