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

Failed to fetch logs due to AttributeError #231

Closed
quasiben opened this issue Feb 13, 2020 · 3 comments
Closed

Failed to fetch logs due to AttributeError #231

quasiben opened this issue Feb 13, 2020 · 3 comments

Comments

@quasiben
Copy link
Member

quasiben commented Feb 13, 2020

When playing with this binder example we get an error when running:

cluster.logs()

Notebook is using kube-cluster version 0.10 and distributed 2.9.0

error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-12-1b877c3f8b87> in <module>
----> 1 cluster.logs()

/srv/conda/envs/notebook/lib/python3.7/site-packages/distributed/deploy/cluster.py in logs(self, scheduler, workers)
    193             each worker
    194         """
--> 195         return self.sync(self._logs, scheduler=scheduler, workers=workers)
    196 
    197     @property

/srv/conda/envs/notebook/lib/python3.7/site-packages/distributed/deploy/cluster.py in sync(self, func, asynchronous, callback_timeout, *args, **kwargs)
    160             return future
    161         else:
--> 162             return sync(self.loop, func, *args, **kwargs)
    163 
    164     async def _logs(self, scheduler=True, workers=True):

/srv/conda/envs/notebook/lib/python3.7/site-packages/distributed/utils.py in sync(loop, func, callback_timeout, *args, **kwargs)
    332     if error[0]:
    333         typ, exc, tb = error[0]
--> 334         raise exc.with_traceback(tb)
    335     else:
    336         return result[0]

/srv/conda/envs/notebook/lib/python3.7/site-packages/distributed/utils.py in f()
    316             if callback_timeout is not None:
    317                 future = gen.with_timeout(timedelta(seconds=callback_timeout), future)
--> 318             result[0] = yield future
    319         except Exception as exc:
    320             error[0] = sys.exc_info()

/srv/conda/envs/notebook/lib/python3.7/site-packages/tornado/gen.py in run(self)
    733 
    734                     try:
--> 735                         value = future.result()
    736                     except Exception:
    737                         exc_info = sys.exc_info()

/srv/conda/envs/notebook/lib/python3.7/site-packages/dask_kubernetes/core.py in _logs(self, scheduler, workers)
    603 
    604         if scheduler:
--> 605             logs["Scheduler"] = await self.scheduler.logs()
    606 
    607         if workers:

AttributeError: 'Scheduler' object has no attribute 'logs'
@TomAugspurger
Copy link
Member

I think that's related to the #162 refactor. We want self.scheduler.get_logs() since it's not an rpc anymore?

@jacobtomlinson
Copy link
Member

jacobtomlinson commented Feb 13, 2020

Thanks for the pointer @TomAugspurger, that makes sense!

I think this should be changed here https://github.com/dask/dask-kubernetes/blob/master/dask_kubernetes/core.py#L679.

@jacobtomlinson
Copy link
Member

Circling back to this issue. I just tested latest versions and both cluster.logs() and cluster.get_logs() seem to be working so going to close this out.

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

Successfully merging a pull request may close this issue.

3 participants