Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Missing Callable case handling at async post for conda_envs #107

Closed
viniciusdc opened this issue Sep 6, 2022 · 0 comments · Fixed by #108
Closed

[Bug] Missing Callable case handling at async post for conda_envs #107

viniciusdc opened this issue Sep 6, 2022 · 0 comments · Fixed by #108
Assignees
Labels
bug Something isn't working

Comments

@viniciusdc
Copy link
Contributor

viniciusdc commented Sep 6, 2022

Describe the bug
It seems that there was a missing case for conda_envs:Callable here, which generates the following error when the post request is executed:

[E 2022-09-06 23:10:51.276 JupyterHub web:1798] Uncaught exception POST /hub/dashboards-new (10.244.0.1)
     HTTPServerRequest(protocol='http', host='***', method='POST', uri='/hub/dashboards-new', version='HTTP/1.1', remote_ip='10.244.0.1')
     Traceback (most recent call last):
       File "/opt/conda/lib/python3.9/site-packages/tornado/web.py", line 1713, in _execute
         result = await result 
       File "/opt/conda/lib/python3.9/site-packages/cdsdashboards/hubextension/main.py", line 270, in post 
         elif conda_env not in all_conda_envs:
     TypeError: argument of type 'functools.partial' is not iterable

 [E 2022-09-06 23:10:51.279 JupyterHub web:1221] Uncaught exception in write_error  
     Traceback (most recent call last):
       File "/opt/conda/lib/python3.9/site-packages/tornado/web.py", line 1219, in send_error
         self.write_error(status_code, **kwargs)
       File "/opt/conda/lib/python3.9/site-packages/jupyterhub/handlers/base.py", line 1293, in write_error
         self.write(html)
       File "/opt/conda/lib/python3.9/site-packages/tornado/web.py", line 843, in write
         raise TypeError(message)

     TypeError: write() only accepts bytes, unicode, and dict objects 

To Reproduce

  • Pass a callable object into c.CDSDashboardsConfig.conda_envs

Screenshots

Configuration

    c.CDSDashboardsConfig.conda_envs = partial(
        get_conda_environments, **kw
    )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants