diff --git a/mhcflurry/class1_neural_network.py b/mhcflurry/class1_neural_network.py
index b185fdba5c4cff6c9f466bc2bc801ec950ac2c53..0a0e7d9959f305290bcda3050f6208585ef83f90 100644
--- a/mhcflurry/class1_neural_network.py
+++ b/mhcflurry/class1_neural_network.py
@@ -957,4 +957,4 @@ class Class1NeuralNetwork(object):
         else:
             raise NotImplementedError(
                 "Network surgery required: %s != %s" % (
-                    str(existing), str(allele_representations.shape)))
+                    str(existing.shape), str(allele_representations.shape)))