diff --git a/gns3server/modules/dynamips/__init__.py b/gns3server/modules/dynamips/__init__.py index b8053c3e..1592e9ce 100644 --- a/gns3server/modules/dynamips/__init__.py +++ b/gns3server/modules/dynamips/__init__.py @@ -560,8 +560,8 @@ class Dynamips(BaseManager): raise DynamipsError("Could not create Dynamips configs directory: {}".format(e)) try: - with open(path, "w") as f: - f.write(content) + with open(path, "wb") as f: + f.write(content.encode("utf-8")) except OSError as e: raise DynamipsError("Could not create config file {}: {}".format(path, e))