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

TypeError: can't serialize 0 #383

Open WillieMaddox opened 5 years ago

WillieMaddox commented 5 years ago

This happens when running Motion-Planning if the self.waypoints are of type np.int64 which is what you get when using the example code from the medial_axis lesson. This bug goes away if you recast your waypoints as standard python ints. I can produce this bug on Ubunutu 16.04. Have not tried Win or Mac.

Here is the full traceback

Sending waypoints to simulator ...
Traceback (most recent call last):
  File "/home/maddoxw/.virtualenvs/fcnd/lib/python3.6/site-packages/udacidrone/drone.py", line 378, in notify_callbacks
    fn()
  File "motion_planning.py", line 73, in state_callback
    self.plan_path()
  File "motion_planning.py", line 195, in plan_path
    self.send_waypoints()
  File "motion_planning.py", line 117, in send_waypoints
    data = msgpack.dumps(self.waypoints)
  File "/home/maddoxw/.virtualenvs/fcnd/lib/python3.6/site-packages/msgpack/__init__.py", line 47, in packb
    return Packer(**kwargs).pack(o)
  File "msgpack/_packer.pyx", line 284, in msgpack._packer.Packer.pack
  File "msgpack/_packer.pyx", line 290, in msgpack._packer.Packer.pack
  File "msgpack/_packer.pyx", line 287, in msgpack._packer.Packer.pack
  File "msgpack/_packer.pyx", line 263, in msgpack._packer.Packer._pack
  File "msgpack/_packer.pyx", line 263, in msgpack._packer.Packer._pack
  File "msgpack/_packer.pyx", line 281, in msgpack._packer.Packer._pack
TypeError: can't serialize 0
gokhanbarisaker commented 3 years ago

Any progress on this issue?