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

no stacktrace printed in bokeh serve mode after import datashader #3638

Closed
oarcher opened this issue Apr 19, 2019 · 6 comments
Closed

no stacktrace printed in bokeh serve mode after import datashader #3638

oarcher opened this issue Apr 19, 2019 · 6 comments
Labels
type: bug Something isn't correct or isn't working
Milestone

Comments

@oarcher
Copy link

oarcher commented Apr 19, 2019

While working on test code described on #959 (comment) , no stacktrace are printed in case of exception, making debug very difficult.

minimal code bterr.py

from holoviews.operation.datashader import datashade
a=1/0  # no bt printed, nothing happen in console
bokeh serve --port 5006 --address 0.0.0.0 --allow-websocket-origin='*' bterr.py

env:
bokeh 1.1.0 py37_0
holoviews 1.12.1 py_2
python 3.7.1 h0371630_7

@oarcher
Copy link
Author

oarcher commented Apr 19, 2019

also tried with older packages versions, with same problem:

bokeh                     0.13.0                   py36_0  
holoviews                 1.8.4                    py36_1   
python                    3.6.8                h0371630_0 

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Apr 19, 2019
@philippjfr philippjfr added this to the v1.12.x milestone Apr 19, 2019
@oarcher
Copy link
Author

oarcher commented Apr 24, 2019

It seem that backtrace disappear after import xarray as xr in https://github.com/pyviz/holoviews/blob/6042f95f01a79fe46bbf0d1cd55f298587e90dd7/holoviews/operation/datashader.py#L9

with xarray=0.11.3, at https://github.com/pydata/xarray/blob/d58e0769c7d600d5c8c3c2fb52aa28856c4d3290/xarray/__init__.py#L22

But downgrading xarray to xarray=0.11.0 makes bt appear normaly ( xarray=0.11.2 broke it)

So minimal test code become :

import xarray
a=1/0  # no bt printed, nothing happen in bokeh serve console

@philippjfr
Copy link
Member

That's truly bizarre. xarray must be messing with standard output and error streams somehow. Would be good to track this down and file an issue upstream.

@oarcher
Copy link
Author

oarcher commented Apr 24, 2019

stderr is still ok, because

import xarray
import sys
print("this message is printed",file=sys.stderr)

works as expected.

I go further in tracing the problem, and located the pb in https://github.com/pydata/xarray/blob/624d78f48cfa54b8952219ecf37bcee4673da900/xarray/backends/locks.py#L12, so new test code become:

from dask.distributed import Lock as DistributedLock
a=1/0 # no bt printed in bokeh console

(with dask=1.2.0)

So i need advice to fill up a bug report upstream. Is it related to bokeh that is not reporting traceback in thread context, or xarray or dask ?

@philippjfr philippjfr modified the milestones: v1.12.x, v1.12.6 Sep 23, 2019
@philippjfr
Copy link
Member

This is down to distributed and should be fixed in the next release.

@philippjfr philippjfr modified the milestones: v1.12.6, v1.13.0 Oct 7, 2019
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

2 participants