We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd79a98 commit 349045eCopy full SHA for 349045e
jupyter_server/base/handlers.py
@@ -35,7 +35,7 @@
35
36
from traitlets.config import Application
37
from ipython_genutils.path import filefind
38
-from ipython_genutils.py3compat import string_types
+from ipython_genutils.py3compat import string_types, PY3
39
40
import jupyter_server
41
from jupyter_server._tz import utcnow
@@ -419,6 +419,10 @@ def check_host(self):
419
if host.startswith('[') and host.endswith(']'):
420
host = host[1:-1]
421
422
+ if not PY3:
423
+ # ip_address only accepts unicode on Python 2
424
+ host = host.decode('utf8', 'replace')
425
+
426
try:
427
addr = ipaddress.ip_address(host)
428
except ValueError:
0 commit comments