diff --git a/pcapfile/structs.py b/pcapfile/structs.py
index <HASH>..<HASH> 100644
--- a/pcapfile/structs.py
+++ b/pcapfile/structs.py
@@ -54,7 +54,13 @@ class pcap_packet(ctypes.Structure):
         return binascii.unhexlify(self.packet)
 
     def __repr__(self):
-        return self.raw()
+        if isinstance(self.packet, str):
+            try:
+                return self.raw()
+            except TypeError:
+                return str(self.packet)
+        else:
+            return str(self.packet)
pcap_packets have improved __repr__

if the packet is a string (i.e. not decoded), the packet will
still be represented as a string; otherwise, it is up to the
decoded packet type to choose display types.