diff --git a/generator/mavparse.py b/generator/mavparse.py
index 444793b0b..74f441c99 100644
--- a/generator/mavparse.py
+++ b/generator/mavparse.py
@@ -456,7 +456,7 @@ def __str__(self):
 def message_checksum(msg):
     '''calculate CRC-16/MCRF4XX checksum of the key fields of a message, so we
        can detect incompatible XML changes'''
-    from .mavcrc import x25crc
+    from pymavlink.generator.mavcrc import x25crc
     crc = x25crc()
     crc.accumulate_str(msg.name + ' ')
     # in order to allow for extensions the crc does not include