udacity / udacidrone

An API for working with flying objects, simulated, unidentified, and otherwise.
https://udacity.github.io/udacidrone
131 stars 96 forks source link

Catching exception when time attribute is missing #60

Open saadshamim01 opened 3 years ago

saadshamim01 commented 3 years ago

Hi, I enjoyed doing the course but ran into an issue as described here - https://knowledge.udacity.com/questions/12507

Sending waypoints to simulator ...
Traceback (most recent call last):
File "/anaconda/envs/fcnd/lib/python3.6/site-packages/udacidrone/connection/connection.py", line 88, in notify_message_listeners
fn(name, msg)
File "/anaconda/envs/fcnd/lib/python3.6/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'

This is the workaround I found and I think it will be a helpful fix for all other students. Let me know what do you think about this PR