diff --git a/Simulation/G4Atlas/G4AtlasServices/test/G4AtlasFieldServices_test.py b/Simulation/G4Atlas/G4AtlasServices/test/G4AtlasFieldServices_test.py
index 9f137248cef4c8e78290f702c15e27fcf4fd4f1b..f5bdada31cbfd7aae289303e87f74c3b9e5c8106 100755
--- a/Simulation/G4Atlas/G4AtlasServices/test/G4AtlasFieldServices_test.py
+++ b/Simulation/G4Atlas/G4AtlasServices/test/G4AtlasFieldServices_test.py
@@ -54,7 +54,7 @@ if __name__ == '__main__':
   ConfigFlags.dump()
 
 
-  f=open("test.pkl","w")
+  f=open("test.pkl","wb")
   cfg.store(f)
   f.close()