question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception in message handler for heartbeat

See original GitHub issue

I found 3 threads about this but no authorative answer/solution:

https://groups.google.com/forum/#!topic/drones-discuss/tQQjc0_5Eng https://discuss.dronekit.io/t/issue-with-vehicle-state-py-and-rover/307 https://discuss.dronekit.io/t/missionplanner-and-dronekit-floods-console-with-errors/287

Im running dronekit 2.4.0 on an odroid UX4, connected with an FTDI cable to the Pixhawk Telem 2 port (dronekit is reading straight from /dev/ttyUSB0). Pixhawk is running APM copter 3.3.3 and the 3DR Radio is on Telem 1. Serial 4/5 is also in use (Taranis telemetry).

I notice the following messages being spammed to std err/out on the odroid. Otherwise it does seem to be working properly (both reading the data via dronekit and apm planner 2.0).

...
argument of type 'NoneType' is not iterable
Exception in message handler for HEARTBEAT
argument of type 'NoneType' is not iterable
Exception in message handler for HEARTBEAT
argument of type 'NoneType' is not iterable
Exception in message handler for HEARTBEAT
...

It seems the issue is something to do with the telem1 & telem2 streams interfering with each other somehow? Some guidance as to what the correct usage pattern is would be appreciated. Or confirm if this is a bug.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Reactions:3
  • Comments:75 (22 by maintainers)

github_iconTop GitHub Comments

2reactions
Coruscocommented, Oct 6, 2016

@lidia-toscano In my experience, the XML definitions pymavlink is looking for are located in the Mavlink library, unless you generate your own and give pymavlink a reference to their location. The easiest and most thorough solution that I have found is to install mavlink by cloning from https://github.com/mavlink/mavlink, and updating the submodules or navigating into the pymavlink directory (inside the mavlink directory) and cloning from https://github.com/ArduPilot/pymavlink. Running the setup should complete successfully here.

1reaction
kostkarcommented, Oct 11, 2016

I tried the following today and it worked for me:

pip unistall pymavlink (multiple times) pip unistall dronekit pip install dronekit (this added pymavlink back in but not the version I want) git clone https://github.com/mavlink/mavlink cd mavlink git clone https://github.com/Ardupilot/pymavlink (by using clone in the mavlink directory the build can find the message definitions and there is no need for extra work) cd pymavlink setup.py build install

Hope it helps.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Dronekit with CubePilot Orange/ADS-B Carrier board
Whenever I run a dronekit script that ran fine on my old pixhawk 1 board I get an error: Exception in message handler...
Read more >
Console getting flooded by "Exception in message handler for ...
Exception in message handler for HEARTBEAT. >>> argument of type 'NoneType' is not iterable. >>> Exception in message handler for HEARTBEAT.
Read more >
dronekit/dronekit-python - Gitter
... definition >>> Exception in message handler for HEARTBEAT >>> mode 0 not available ... @alduxvm Hi, it's because it's picking up the...
Read more >
Error sending dronekit command while navigating in t265
ERROR:dronekit:Exception in message handler for HEARTBEAT ... raise APIException(“mode (%s, %s) not available on mavlink definition” ...
Read more >
5. Error Handling — Advanced Message Processing System ...
When using asynchronous message processing, exceptions thrown from the message handler are silently absorbed by the AMPS C++ client by default.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found