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

Bokeh streams callback fails with convert_timestamp in Python 2.7 #3412

Closed
darynwhite opened this issue Jan 17, 2019 · 7 comments
Closed

Bokeh streams callback fails with convert_timestamp in Python 2.7 #3412

darynwhite opened this issue Jan 17, 2019 · 7 comments
Milestone

Comments

@darynwhite
Copy link
Contributor

darynwhite commented Jan 17, 2019

Discovered this while writing a BoundsX to review dates of a selected data points in a time series. It fails out and kills the stream.

https://github.com/ioam/holoviews/blob/9a6a630b727c8827a8bd6fbe77bf31e1f35a7e5a/holoviews/plotting/bokeh/util.py#L89

The output from browser console:

Python failed with the following traceback:
~/conda/lib/python2.7/site-packages/pyviz_comms/__init__.py _handle_msg L296
~/conda/lib/python2.7/site-packages/holoviews/plotting/bokeh/callbacks.py on_msg L121
~/conda/lib/python2.7/site-packages/holoviews/plotting/bokeh/callbacks.py _process_msg L821
~/conda/lib/python2.7/site-packages/holoviews/plotting/bokeh/util.py convert_timestamp L89
	AttributeError: 'module' object has no attribute 'timezone'
@darynwhite
Copy link
Contributor Author

Is this a bug or just an unfortunate result of writing for 3.6+ and trying to support 2.7.15?

@philippjfr
Copy link
Member

Both I guess. Should have added unit tests which would have caught this, since all core developers now use 3.6+.

@darynwhite
Copy link
Contributor Author

I'm working on moving our code library to be 3.6+ compatible, but it isn't as simple as a conversion script unfortunately. Some dependencies have to be replaced so identifying replacements has been difficult. Library runs fine in 2.7.15 so I have to rely on that while working on updates. Should I just edit my install as a work around for the time being?

@philippjfr philippjfr added this to the v1.11.2 milestone Jan 23, 2019
@philippjfr
Copy link
Member

philippjfr commented Jan 23, 2019

Sure, a PR would also be appreciated if you work out a fix. That way we can try to get the fix into the 1.11.2 release scheduled for later this week or early next week.

@darynwhite
Copy link
Contributor Author

What's the reasoning behind not using dt.datetime.utcfromtimestamp or was this overlooked?

@philippjfr
Copy link
Member

Sounds like that was simply overlooked.

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
None yet
Projects
None yet
Development

No branches or pull requests

2 participants