`KeyError` in `ProfileTimePlot.update`
See original GitHub issueAug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: 2022-08-11 09:49:57,015 - bokeh.core.property.validation - ERROR - 'start'
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: Traceback (most recent call last):
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/distributed/utils.py", line 805, in wrapper
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: return func(*args, **kwargs)
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/distributed/dashboard/components/shared.py", line 295, in update
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: ts = metadata["keys"][self.key]
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: KeyError: 'start'
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: 2022-08-11 09:49:57,015 - tornado.application - ERROR - Exception in callback functools.partial(<bound method IOLoop._discard_future_result of <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f455b4cd0c0>>, <Task finished name='Task-5714' coro=<ServerSession.with_document_locked() done, defined at /opt/conda/envs/coiled/lib/python3.10/site-packages/bokeh/server/session.py:78> exception=KeyError('start')>)
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: Traceback (most recent call last):
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/tornado/ioloop.py", line 741, in _run_callback
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: ret = callback()
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/tornado/ioloop.py", line 765, in _discard_future_result
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: future.result()
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/bokeh/server/session.py", line 95, in _needs_document_lock_wrapper
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: result = func(self, *args, **kwargs)
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/bokeh/server/session.py", line 229, in with_document_locked
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: return func(*args, **kwargs)
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/bokeh/document/callbacks.py", line 450, in wrapper
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: return invoke_with_curdoc(doc, invoke)
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/bokeh/document/callbacks.py", line 408, in invoke_with_curdoc
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: return f()
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/bokeh/document/callbacks.py", line 449, in invoke
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: return f(*args, **kwargs)
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/bokeh/document/callbacks.py", line 179, in remove_then_invoke
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: return callback()
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/distributed/dashboard/components/shared.py", line 316, in <lambda>
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: self.doc().add_next_tick_callback(lambda: self.update(prof, metadata))
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/bokeh/core/property/validation.py", line 95, in func
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: return input_function(*args, **kwargs)
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/distributed/utils.py", line 805, in wrapper
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: return func(*args, **kwargs)
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: File "/opt/conda/envs/coiled/lib/python3.10/site-packages/distributed/dashboard/components/shared.py", line 295, in update
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: ts = metadata["keys"][self.key]
Aug 11 09:49:57 ip-10-0-12-62 cloud-init[1268]: KeyError: 'start'
(https://cloud.coiled.io/dask-engineering/clusters/48635/details)
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Python KeyError Exceptions and How to Handle Them
In this tutorial, you'll learn how to handle Python KeyError exceptions. They are often caused by a bad key lookup in a dictionary,...
Read more >How to Fix KeyError Exceptions in Python - Rollbar
The Python KeyError is an exception that occurs when an attempt is made to access an item in a dictionary that does not...
Read more >How to fix Python KeyError Exceptions in simple steps?
Know about Python KeyError Exception. And learn how to handle exceptions in Python. A detailed guide to Errors and Exceptions in Python.
Read more >What is KeyError in Python? Dictionary and Handling Them
This article will provide you with a detailed and comprehensive knowledge of how to resolve KeyError in Python in Dictionary.
Read more >I'm getting Key error in python - Stack Overflow
A KeyError generally means the key doesn't exist. So, are you sure the path key exists? From the official python docs: exception KeyError....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @bilzard, that’s helpful. I’m able with to reproduce with the current
main
branch ofdistributed
if I just create aLocalCluster
, then navigate to the dashboard, and click on the empty task stream plot. @hendrikmakait do you have bandwidth to look into this one?The task stream plot has an empty glyph on it named start when first starting. This was due to a historical bug in Bokeh.
When you click on a rectangle in the task stream plot it brings up the profile plot keyed to all profile history of tasks with that name. When you’ve first started up the scheduler without any tasks run the profile will be empty.
Probably we shouldn’t err here, but should present an empty profile plot. In practice though, this isn’t that big of an issue. It’s a bit awkward that this situation exists, but it’s entirely artificial.
On Wed, Dec 21, 2022 at 8:40 PM James Bourbeau @.***> wrote: