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

[BUG] events_app.py is broken #10221

Closed
bryevdv opened this issue Jun 22, 2020 · 3 comments
Closed

[BUG] events_app.py is broken #10221

bryevdv opened this issue Jun 22, 2020 · 3 comments

Comments

@bryevdv
Copy link
Member

bryevdv commented Jun 22, 2020

With 2.1.1 release, this line fails:

        const {to_string} = Bokeh.require("core/util/pretty")

wiht the error:

Error: Cannot find module 'core/util/pretty'

cc @mattpap is this some old, bad usage, that should have already previously been udpated in the example? Or was is this a regression that should work and was broken #10188 ?

My guess is the former, and that this should be using import but I wanted to check for sure before labeling.

Edit: perhaps not, since the code in a CustomJS is not a module, import does not seem to work.

@mattpap
Copy link
Contributor

mattpap commented Jun 22, 2020

I'm pretty sure there's a mismatch between the version of events_app example you are running and bokehjs' version. core/util/pretty is available on master and the example was updated accordingly. In release-2.1 branch there should be no such module and the example should use JSON.stringify().

@mattpap
Copy link
Contributor

mattpap commented Jun 22, 2020

import can only be used at the top-level of modules, so unfortunately we can't use it in CustomJS. However, one can use dynamic imports, i.e. await import(),

@bryevdv
Copy link
Member Author

bryevdv commented Jun 22, 2020

You're right, I was looking at master. New habits take time

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

No branches or pull requests

2 participants