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

Cannot start dask-gateway-server due to KeyError #565

Closed
pgierz opened this issue May 18, 2022 · 2 comments
Closed

Cannot start dask-gateway-server due to KeyError #565

pgierz opened this issue May 18, 2022 · 2 comments

Comments

@pgierz
Copy link

pgierz commented May 18, 2022

Hello,

thanks for building dask-gateway, I feel like it would be very useful. I'm currently working through the local example with two terminals, one which should be running the server, and then another for the client. Unfortunately, the server doesn't start due to (I believe) an error in trailets. I would post the bug there, but I would need some info before hand about how trailets is being used here. Or maybe there is a quick fix ;-)

What happened:

$ dask-gateway-server                     
Traceback (most recent call last):
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/traitlets.py", line 642, in get
    value = obj._trait_values[self.name]
KeyError: 'log'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/logging/config.py", line 544, in configure
    formatters[name] = self.configure_formatter(
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/logging/config.py", line 683, in configure_formatter
    result = c(fmt, dfmt, style)
TypeError: LogFormatter.__init__() takes from 1 to 3 positional arguments but 4 were given

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/bin/dask-gateway-server", line 33, in <module>
    sys.exit(load_entry_point('dask-gateway-server', 'console_scripts', 'dask-gateway-server')())
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/config/application.py", line 971, in launch_instance
    app.initialize(argv)
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/config/application.py", line 107, in inner
    return method(app, *args, **kwargs)
  File "/home/csys/pgierz/SciComp/Projects/Dask_Gateway_Server/software/github.com/dask/dask-gateway/dask-gateway-server/dask_gateway_server/app.py", line 154, in initialize
    super().initialize(argv)
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/config/application.py", line 107, in inner
    return method(app, *args, **kwargs)
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/config/application.py", line 450, in initialize
    self.parse_command_line(argv)
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/config/application.py", line 107, in inner
    return method(app, *args, **kwargs)
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/config/application.py", line 809, in parse_command_line
    loader = self._create_loader(argv, aliases, flags, classes=classes)
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/config/application.py", line 769, in _create_loader
    return KVArgParseConfigLoader(argv, aliases, flags, classes=classes, log=self.log)
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/traitlets.py", line 683, in __get__
    return self.get(obj, cls)
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/traitlets.py", line 657, in get
    obj._notify_observers(
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/traitlets.py", line 1428, in _notify_observers
    c(event)
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/config/application.py", line 273, in _observe_logging_default
    self._configure_logging()
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/site-packages/traitlets/config/application.py", line 278, in _configure_logging
    dictConfig(config)
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/logging/config.py", line 810, in dictConfig
    dictConfigClass(config).configure()
  File "/home/csys/pgierz/.conda/envs/dask-gateway-dev/lib/python3.10/logging/config.py", line 547, in configure
    raise ValueError('Unable to configure '
ValueError: Unable to configure formatter 'console'

What you expected to happen:

The server starts

Environment:

  • Dask version: 2022.05.0
  • Python version: 3.10
  • Operating System: Ubuntu
  • Install method (conda, pip, source): development install via miniconda and the provided dev-environment.yaml
@consideRatio
Copy link
Collaborator

consideRatio commented Jun 13, 2022

This was resolved in #573, version 2022.6.0 will include the fix. Thank you for a well written bug report @pgierz, it really helps!!! 🎉 ❤️ 🌻

@pgierz
Copy link
Author

pgierz commented Jun 13, 2022

Excellent! Happy to help, even if it just being that "annoying user" ;-)

I fell into the non-specific dependencies trap a few times as well, looking at the PR it seems that was (partially?) the problem. Hooray for pinned versions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants