We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
The 'user' trait of a SingleUserNotebookApp instance must be a unicode string, but a value of 1384482<class 'int'> was specified.
I'm using the `SudoSpawner` in combination with Active Directory+PAM based authentication. This results in users being created on the Linux server with numeric IDs that map to AD users. This works fine with users whos AD logins are name-based, but users with numeric IDs cannot log in.

Looking at the logs I've found that the error occurs when trying to launch the instance of `SingleUserNotebookApp` due to the user ID being interpreted as an `int` rather than `str`. 

```
The 'user' trait of a SingleUserNotebookApp instance must be a unicode string, 
     but a value of 1384482 <class 'int'> was specified.
mfitzp@bms-jupyter:~$ /usr/bin/python3 -m jupyterhub.singleuser --user="1384482" 
     --port=36359 --cookie-name=jupyter-hub-token-1384482 --base-url=/user/1384482
     --hub-prefix=/hub/ --hub-api-url=http://localhost:8081/hub/api --ip=localhost 
```

Looking at the source the `user` property is defined as a `Unicode` traitlet so I'm unsure what is going on here? Is this perhaps a IPython issue? In `argparse` it's possible to define the type for command-line arguments to be mapped to, but I could not find the equivalent in the traitlet system.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `jupyterhub/singleuser.py`
Content:
```
1 #!/usr/bin/env python
2 """Extend regular notebook server to be aware of multiuser things."""
3 
4 # Copyright (c) Jupyter Development Team.
5 # Distributed under the terms of the Modified BSD License.
6 
7 import os
8 from urllib.parse import quote
9 
10 import requests
11 
12 from tornado import ioloop
13 from tornado.web import HTTPError
14 
15 from IPython.utils.traitlets import (
16     Integer,
17     Unicode,
18 )
19 
20 from IPython.html.notebookapp import NotebookApp
21 from IPython.html.auth.login import LoginHandler
22 from IPython.html.auth.logout import LogoutHandler
23 
24 from IPython.html.utils import url_path_join
25 
26 
27 from distutils.version import LooseVersion as V
28 
29 import IPython
30 if V(IPython.__version__) < V('3.0'):
31     raise ImportError("JupyterHub Requires IPython >= 3.0, found %s" % IPython.__version__)
32 
33 # Define two methods to attach to AuthenticatedHandler,
34 # which authenticate via the central auth server.
35 
36 class JupyterHubLoginHandler(LoginHandler):
37     @staticmethod
38     def login_available(settings):
39         return True
40     
41     @staticmethod
42     def verify_token(self, cookie_name, encrypted_cookie):
43         """method for token verification"""
44         cookie_cache = self.settings['cookie_cache']
45         if encrypted_cookie in cookie_cache:
46             # we've seen this token before, don't ask upstream again
47             return cookie_cache[encrypted_cookie]
48     
49         hub_api_url = self.settings['hub_api_url']
50         hub_api_key = self.settings['hub_api_key']
51         r = requests.get(url_path_join(
52             hub_api_url, "authorizations/cookie", cookie_name, quote(encrypted_cookie, safe=''),
53         ),
54             headers = {'Authorization' : 'token %s' % hub_api_key},
55         )
56         if r.status_code == 404:
57             data = None
58         elif r.status_code == 403:
59             self.log.error("I don't have permission to verify cookies, my auth token may have expired: [%i] %s", r.status_code, r.reason)
60             raise HTTPError(500, "Permission failure checking authorization, I may need to be restarted")
61         elif r.status_code >= 500:
62             self.log.error("Upstream failure verifying auth token: [%i] %s", r.status_code, r.reason)
63             raise HTTPError(502, "Failed to check authorization (upstream problem)")
64         elif r.status_code >= 400:
65             self.log.warn("Failed to check authorization: [%i] %s", r.status_code, r.reason)
66             raise HTTPError(500, "Failed to check authorization")
67         else:
68             data = r.json()
69         cookie_cache[encrypted_cookie] = data
70         return data
71     
72     @staticmethod
73     def get_user(self):
74         """alternative get_current_user to query the central server"""
75         # only allow this to be called once per handler
76         # avoids issues if an error is raised,
77         # since this may be called again when trying to render the error page
78         if hasattr(self, '_cached_user'):
79             return self._cached_user
80         
81         self._cached_user = None
82         my_user = self.settings['user']
83         encrypted_cookie = self.get_cookie(self.cookie_name)
84         if encrypted_cookie:
85             auth_data = JupyterHubLoginHandler.verify_token(self, self.cookie_name, encrypted_cookie)
86             if not auth_data:
87                 # treat invalid token the same as no token
88                 return None
89             user = auth_data['user']
90             if user == my_user:
91                 self._cached_user = user
92                 return user
93             else:
94                 return None
95         else:
96             self.log.debug("No token cookie")
97             return None
98 
99 
100 class JupyterHubLogoutHandler(LogoutHandler):
101     def get(self):
102         self.redirect(url_path_join(self.settings['hub_prefix'], 'logout'))
103 
104 
105 # register new hub related command-line aliases
106 aliases = NotebookApp.aliases.get_default_value()
107 aliases.update({
108     'user' : 'SingleUserNotebookApp.user',
109     'cookie-name': 'SingleUserNotebookApp.cookie_name',
110     'hub-prefix': 'SingleUserNotebookApp.hub_prefix',
111     'hub-api-url': 'SingleUserNotebookApp.hub_api_url',
112     'base-url': 'SingleUserNotebookApp.base_url',
113 })
114 
115 class SingleUserNotebookApp(NotebookApp):
116     """A Subclass of the regular NotebookApp that is aware of the parent multiuser context."""
117     user = Unicode(config=True)
118     def _user_changed(self, name, old, new):
119         self.log.name = new
120     cookie_name = Unicode(config=True)
121     hub_prefix = Unicode(config=True)
122     hub_api_url = Unicode(config=True)
123     aliases = aliases
124     open_browser = False
125     login_handler_class = JupyterHubLoginHandler
126     logout_handler_class = JupyterHubLogoutHandler
127 
128     cookie_cache_lifetime = Integer(
129         config=True,
130         default_value=300,
131         allow_none=True,
132         help="""
133         Time, in seconds, that we cache a validated cookie before requiring
134         revalidation with the hub.
135         """,
136     )
137 
138     def _log_datefmt_default(self):
139         """Exclude date from default date format"""
140         return "%Y-%m-%d %H:%M:%S"
141 
142     def _log_format_default(self):
143         """override default log format to include time"""
144         return "%(color)s[%(levelname)1.1s %(asctime)s.%(msecs).03d %(name)s %(module)s:%(lineno)d]%(end_color)s %(message)s"
145 
146     def _confirm_exit(self):
147         # disable the exit confirmation for background notebook processes
148         ioloop.IOLoop.instance().stop()
149 
150     def _clear_cookie_cache(self):
151         self.log.info("Clearing cookie cache")
152         self.tornado_settings['cookie_cache'].clear()
153 
154     def initialize(self, argv=None):
155         super().initialize(argv=argv)
156 
157         # Start a PeriodicCallback to clear cached cookies.  This forces us to
158         # revalidate our user with the Hub at least every
159         # `cookie_cache_lifetime` seconds.
160         if self.cookie_cache_lifetime:
161             ioloop.PeriodicCallback(
162                 self._clear_cookie_cache,
163                 self.cookie_cache_lifetime * 1e3,
164             ).start()
165 
166     def init_webapp(self):
167         # load the hub related settings into the tornado settings dict
168         env = os.environ
169         s = self.tornado_settings
170         s['cookie_cache'] = {}
171         s['user'] = self.user
172         s['hub_api_key'] = env.pop('JPY_API_TOKEN')
173         s['hub_prefix'] = self.hub_prefix
174         s['cookie_name'] = self.cookie_name
175         s['login_url'] = url_path_join(self.hub_prefix, 'login')
176         s['hub_api_url'] = self.hub_api_url
177         super(SingleUserNotebookApp, self).init_webapp()
178 
179 
180 def main():
181     return SingleUserNotebookApp.launch_instance()
182 
183 
184 if __name__ == "__main__":
185     main()
186
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/jupyterhub/singleuser.py b/jupyterhub/singleuser.py
--- a/jupyterhub/singleuser.py
+++ b/jupyterhub/singleuser.py
@@ -15,6 +15,7 @@
 from IPython.utils.traitlets import (
     Integer,
     Unicode,
+    CUnicode,
 )
 
 from IPython.html.notebookapp import NotebookApp
@@ -114,7 +115,7 @@
 
 class SingleUserNotebookApp(NotebookApp):
     """A Subclass of the regular NotebookApp that is aware of the parent multiuser context."""
-    user = Unicode(config=True)
+    user = CUnicode(config=True)
     def _user_changed(self, name, old, new):
         self.log.name = new
     cookie_name = Unicode(config=True)

{"golden_diff": "diff --git a/jupyterhub/singleuser.py b/jupyterhub/singleuser.py\n--- a/jupyterhub/singleuser.py\n+++ b/jupyterhub/singleuser.py\n@@ -15,6 +15,7 @@\n from IPython.utils.traitlets import (\n     Integer,\n     Unicode,\n+    CUnicode,\n )\n \n from IPython.html.notebookapp import NotebookApp\n@@ -114,7 +115,7 @@\n \n class SingleUserNotebookApp(NotebookApp):\n     \"\"\"A Subclass of the regular NotebookApp that is aware of the parent multiuser context.\"\"\"\n-    user = Unicode(config=True)\n+    user = CUnicode(config=True)\n     def _user_changed(self, name, old, new):\n         self.log.name = new\n     cookie_name = Unicode(config=True)\n", "issue": "The 'user' trait of a SingleUserNotebookApp instance must be a unicode string, but a value of 1384482<class 'int'> was specified.\nI'm using the `SudoSpawner` in combination with Active Directory+PAM based authentication. This results in users being created on the Linux server with numeric IDs that map to AD users. This works fine with users whos AD logins are name-based, but users with numeric IDs cannot log in.\n\nLooking at the logs I've found that the error occurs when trying to launch the instance of `SingleUserNotebookApp` due to the user ID being interpreted as an `int` rather than `str`. \n\n```\nThe 'user' trait of a SingleUserNotebookApp instance must be a unicode string, \n     but a value of 1384482 <class 'int'> was specified.\nmfitzp@bms-jupyter:~$ /usr/bin/python3 -m jupyterhub.singleuser --user=\"1384482\" \n     --port=36359 --cookie-name=jupyter-hub-token-1384482 --base-url=/user/1384482\n     --hub-prefix=/hub/ --hub-api-url=http://localhost:8081/hub/api --ip=localhost \n```\n\nLooking at the source the `user` property is defined as a `Unicode` traitlet so I'm unsure what is going on here? Is this perhaps a IPython issue? In `argparse` it's possible to define the type for command-line arguments to be mapped to, but I could not find the equivalent in the traitlet system.\n\n", "before_files": [{"content": "#!/usr/bin/env python\n\"\"\"Extend regular notebook server to be aware of multiuser things.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport os\nfrom urllib.parse import quote\n\nimport requests\n\nfrom tornado import ioloop\nfrom tornado.web import HTTPError\n\nfrom IPython.utils.traitlets import (\n    Integer,\n    Unicode,\n)\n\nfrom IPython.html.notebookapp import NotebookApp\nfrom IPython.html.auth.login import LoginHandler\nfrom IPython.html.auth.logout import LogoutHandler\n\nfrom IPython.html.utils import url_path_join\n\n\nfrom distutils.version import LooseVersion as V\n\nimport IPython\nif V(IPython.__version__) < V('3.0'):\n    raise ImportError(\"JupyterHub Requires IPython >= 3.0, found %s\" % IPython.__version__)\n\n# Define two methods to attach to AuthenticatedHandler,\n# which authenticate via the central auth server.\n\nclass JupyterHubLoginHandler(LoginHandler):\n    @staticmethod\n    def login_available(settings):\n        return True\n    \n    @staticmethod\n    def verify_token(self, cookie_name, encrypted_cookie):\n        \"\"\"method for token verification\"\"\"\n        cookie_cache = self.settings['cookie_cache']\n        if encrypted_cookie in cookie_cache:\n            # we've seen this token before, don't ask upstream again\n            return cookie_cache[encrypted_cookie]\n    \n        hub_api_url = self.settings['hub_api_url']\n        hub_api_key = self.settings['hub_api_key']\n        r = requests.get(url_path_join(\n            hub_api_url, \"authorizations/cookie\", cookie_name, quote(encrypted_cookie, safe=''),\n        ),\n            headers = {'Authorization' : 'token %s' % hub_api_key},\n        )\n        if r.status_code == 404:\n            data = None\n        elif r.status_code == 403:\n            self.log.error(\"I don't have permission to verify cookies, my auth token may have expired: [%i] %s\", r.status_code, r.reason)\n            raise HTTPError(500, \"Permission failure checking authorization, I may need to be restarted\")\n        elif r.status_code >= 500:\n            self.log.error(\"Upstream failure verifying auth token: [%i] %s\", r.status_code, r.reason)\n            raise HTTPError(502, \"Failed to check authorization (upstream problem)\")\n        elif r.status_code >= 400:\n            self.log.warn(\"Failed to check authorization: [%i] %s\", r.status_code, r.reason)\n            raise HTTPError(500, \"Failed to check authorization\")\n        else:\n            data = r.json()\n        cookie_cache[encrypted_cookie] = data\n        return data\n    \n    @staticmethod\n    def get_user(self):\n        \"\"\"alternative get_current_user to query the central server\"\"\"\n        # only allow this to be called once per handler\n        # avoids issues if an error is raised,\n        # since this may be called again when trying to render the error page\n        if hasattr(self, '_cached_user'):\n            return self._cached_user\n        \n        self._cached_user = None\n        my_user = self.settings['user']\n        encrypted_cookie = self.get_cookie(self.cookie_name)\n        if encrypted_cookie:\n            auth_data = JupyterHubLoginHandler.verify_token(self, self.cookie_name, encrypted_cookie)\n            if not auth_data:\n                # treat invalid token the same as no token\n                return None\n            user = auth_data['user']\n            if user == my_user:\n                self._cached_user = user\n                return user\n            else:\n                return None\n        else:\n            self.log.debug(\"No token cookie\")\n            return None\n\n\nclass JupyterHubLogoutHandler(LogoutHandler):\n    def get(self):\n        self.redirect(url_path_join(self.settings['hub_prefix'], 'logout'))\n\n\n# register new hub related command-line aliases\naliases = NotebookApp.aliases.get_default_value()\naliases.update({\n    'user' : 'SingleUserNotebookApp.user',\n    'cookie-name': 'SingleUserNotebookApp.cookie_name',\n    'hub-prefix': 'SingleUserNotebookApp.hub_prefix',\n    'hub-api-url': 'SingleUserNotebookApp.hub_api_url',\n    'base-url': 'SingleUserNotebookApp.base_url',\n})\n\nclass SingleUserNotebookApp(NotebookApp):\n    \"\"\"A Subclass of the regular NotebookApp that is aware of the parent multiuser context.\"\"\"\n    user = Unicode(config=True)\n    def _user_changed(self, name, old, new):\n        self.log.name = new\n    cookie_name = Unicode(config=True)\n    hub_prefix = Unicode(config=True)\n    hub_api_url = Unicode(config=True)\n    aliases = aliases\n    open_browser = False\n    login_handler_class = JupyterHubLoginHandler\n    logout_handler_class = JupyterHubLogoutHandler\n\n    cookie_cache_lifetime = Integer(\n        config=True,\n        default_value=300,\n        allow_none=True,\n        help=\"\"\"\n        Time, in seconds, that we cache a validated cookie before requiring\n        revalidation with the hub.\n        \"\"\",\n    )\n\n    def _log_datefmt_default(self):\n        \"\"\"Exclude date from default date format\"\"\"\n        return \"%Y-%m-%d %H:%M:%S\"\n\n    def _log_format_default(self):\n        \"\"\"override default log format to include time\"\"\"\n        return \"%(color)s[%(levelname)1.1s %(asctime)s.%(msecs).03d %(name)s %(module)s:%(lineno)d]%(end_color)s %(message)s\"\n\n    def _confirm_exit(self):\n        # disable the exit confirmation for background notebook processes\n        ioloop.IOLoop.instance().stop()\n\n    def _clear_cookie_cache(self):\n        self.log.info(\"Clearing cookie cache\")\n        self.tornado_settings['cookie_cache'].clear()\n\n    def initialize(self, argv=None):\n        super().initialize(argv=argv)\n\n        # Start a PeriodicCallback to clear cached cookies.  This forces us to\n        # revalidate our user with the Hub at least every\n        # `cookie_cache_lifetime` seconds.\n        if self.cookie_cache_lifetime:\n            ioloop.PeriodicCallback(\n                self._clear_cookie_cache,\n                self.cookie_cache_lifetime * 1e3,\n            ).start()\n\n    def init_webapp(self):\n        # load the hub related settings into the tornado settings dict\n        env = os.environ\n        s = self.tornado_settings\n        s['cookie_cache'] = {}\n        s['user'] = self.user\n        s['hub_api_key'] = env.pop('JPY_API_TOKEN')\n        s['hub_prefix'] = self.hub_prefix\n        s['cookie_name'] = self.cookie_name\n        s['login_url'] = url_path_join(self.hub_prefix, 'login')\n        s['hub_api_url'] = self.hub_api_url\n        super(SingleUserNotebookApp, self).init_webapp()\n\n\ndef main():\n    return SingleUserNotebookApp.launch_instance()\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "jupyterhub/singleuser.py"}], "after_files": [{"content": "#!/usr/bin/env python\n\"\"\"Extend regular notebook server to be aware of multiuser things.\"\"\"\n\n# Copyright (c) Jupyter Development Team.\n# Distributed under the terms of the Modified BSD License.\n\nimport os\nfrom urllib.parse import quote\n\nimport requests\n\nfrom tornado import ioloop\nfrom tornado.web import HTTPError\n\nfrom IPython.utils.traitlets import (\n    Integer,\n    Unicode,\n    CUnicode,\n)\n\nfrom IPython.html.notebookapp import NotebookApp\nfrom IPython.html.auth.login import LoginHandler\nfrom IPython.html.auth.logout import LogoutHandler\n\nfrom IPython.html.utils import url_path_join\n\n\nfrom distutils.version import LooseVersion as V\n\nimport IPython\nif V(IPython.__version__) < V('3.0'):\n    raise ImportError(\"JupyterHub Requires IPython >= 3.0, found %s\" % IPython.__version__)\n\n# Define two methods to attach to AuthenticatedHandler,\n# which authenticate via the central auth server.\n\nclass JupyterHubLoginHandler(LoginHandler):\n    @staticmethod\n    def login_available(settings):\n        return True\n    \n    @staticmethod\n    def verify_token(self, cookie_name, encrypted_cookie):\n        \"\"\"method for token verification\"\"\"\n        cookie_cache = self.settings['cookie_cache']\n        if encrypted_cookie in cookie_cache:\n            # we've seen this token before, don't ask upstream again\n            return cookie_cache[encrypted_cookie]\n    \n        hub_api_url = self.settings['hub_api_url']\n        hub_api_key = self.settings['hub_api_key']\n        r = requests.get(url_path_join(\n            hub_api_url, \"authorizations/cookie\", cookie_name, quote(encrypted_cookie, safe=''),\n        ),\n            headers = {'Authorization' : 'token %s' % hub_api_key},\n        )\n        if r.status_code == 404:\n            data = None\n        elif r.status_code == 403:\n            self.log.error(\"I don't have permission to verify cookies, my auth token may have expired: [%i] %s\", r.status_code, r.reason)\n            raise HTTPError(500, \"Permission failure checking authorization, I may need to be restarted\")\n        elif r.status_code >= 500:\n            self.log.error(\"Upstream failure verifying auth token: [%i] %s\", r.status_code, r.reason)\n            raise HTTPError(502, \"Failed to check authorization (upstream problem)\")\n        elif r.status_code >= 400:\n            self.log.warn(\"Failed to check authorization: [%i] %s\", r.status_code, r.reason)\n            raise HTTPError(500, \"Failed to check authorization\")\n        else:\n            data = r.json()\n        cookie_cache[encrypted_cookie] = data\n        return data\n    \n    @staticmethod\n    def get_user(self):\n        \"\"\"alternative get_current_user to query the central server\"\"\"\n        # only allow this to be called once per handler\n        # avoids issues if an error is raised,\n        # since this may be called again when trying to render the error page\n        if hasattr(self, '_cached_user'):\n            return self._cached_user\n        \n        self._cached_user = None\n        my_user = self.settings['user']\n        encrypted_cookie = self.get_cookie(self.cookie_name)\n        if encrypted_cookie:\n            auth_data = JupyterHubLoginHandler.verify_token(self, self.cookie_name, encrypted_cookie)\n            if not auth_data:\n                # treat invalid token the same as no token\n                return None\n            user = auth_data['user']\n            if user == my_user:\n                self._cached_user = user\n                return user\n            else:\n                return None\n        else:\n            self.log.debug(\"No token cookie\")\n            return None\n\n\nclass JupyterHubLogoutHandler(LogoutHandler):\n    def get(self):\n        self.redirect(url_path_join(self.settings['hub_prefix'], 'logout'))\n\n\n# register new hub related command-line aliases\naliases = NotebookApp.aliases.get_default_value()\naliases.update({\n    'user' : 'SingleUserNotebookApp.user',\n    'cookie-name': 'SingleUserNotebookApp.cookie_name',\n    'hub-prefix': 'SingleUserNotebookApp.hub_prefix',\n    'hub-api-url': 'SingleUserNotebookApp.hub_api_url',\n    'base-url': 'SingleUserNotebookApp.base_url',\n})\n\nclass SingleUserNotebookApp(NotebookApp):\n    \"\"\"A Subclass of the regular NotebookApp that is aware of the parent multiuser context.\"\"\"\n    user = CUnicode(config=True)\n    def _user_changed(self, name, old, new):\n        self.log.name = new\n    cookie_name = Unicode(config=True)\n    hub_prefix = Unicode(config=True)\n    hub_api_url = Unicode(config=True)\n    aliases = aliases\n    open_browser = False\n    login_handler_class = JupyterHubLoginHandler\n    logout_handler_class = JupyterHubLogoutHandler\n\n    cookie_cache_lifetime = Integer(\n        config=True,\n        default_value=300,\n        allow_none=True,\n        help=\"\"\"\n        Time, in seconds, that we cache a validated cookie before requiring\n        revalidation with the hub.\n        \"\"\",\n    )\n\n    def _log_datefmt_default(self):\n        \"\"\"Exclude date from default date format\"\"\"\n        return \"%Y-%m-%d %H:%M:%S\"\n\n    def _log_format_default(self):\n        \"\"\"override default log format to include time\"\"\"\n        return \"%(color)s[%(levelname)1.1s %(asctime)s.%(msecs).03d %(name)s %(module)s:%(lineno)d]%(end_color)s %(message)s\"\n\n    def _confirm_exit(self):\n        # disable the exit confirmation for background notebook processes\n        ioloop.IOLoop.instance().stop()\n\n    def _clear_cookie_cache(self):\n        self.log.info(\"Clearing cookie cache\")\n        self.tornado_settings['cookie_cache'].clear()\n\n    def initialize(self, argv=None):\n        super().initialize(argv=argv)\n\n        # Start a PeriodicCallback to clear cached cookies.  This forces us to\n        # revalidate our user with the Hub at least every\n        # `cookie_cache_lifetime` seconds.\n        if self.cookie_cache_lifetime:\n            ioloop.PeriodicCallback(\n                self._clear_cookie_cache,\n                self.cookie_cache_lifetime * 1e3,\n            ).start()\n\n    def init_webapp(self):\n        # load the hub related settings into the tornado settings dict\n        env = os.environ\n        s = self.tornado_settings\n        s['cookie_cache'] = {}\n        s['user'] = self.user\n        s['hub_api_key'] = env.pop('JPY_API_TOKEN')\n        s['hub_prefix'] = self.hub_prefix\n        s['cookie_name'] = self.cookie_name\n        s['login_url'] = url_path_join(self.hub_prefix, 'login')\n        s['hub_api_url'] = self.hub_api_url\n        super(SingleUserNotebookApp, self).init_webapp()\n\n\ndef main():\n    return SingleUserNotebookApp.launch_instance()\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "jupyterhub/singleuser.py"}]}