From 0aa9ab53d19ef6afa434313774e093d53a9ff33f Mon Sep 17 00:00:00 2001 From: grossmj Date: Fri, 7 Sep 2018 09:34:17 +0200 Subject: [PATCH] Import encodings.idna to avoid LookupError when standard library is in a zip file. --- gns3server/web/web_server.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gns3server/web/web_server.py b/gns3server/web/web_server.py index 25427af4..80cd2bbe 100644 --- a/gns3server/web/web_server.py +++ b/gns3server/web/web_server.py @@ -29,6 +29,10 @@ import functools import time import atexit +# Import encoding now, to avoid implicit import later. +# Implicit import within threads may cause LookupError when standard library is in a ZIP +import encodings.idna + from .route import Route from ..config import Config from ..compute import MODULES