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

Extension does not load: undefined is not an object (evaluating 'action.help') #19

Closed
ischurov opened this issue Aug 1, 2020 · 5 comments

Comments

@ischurov
Copy link

ischurov commented Aug 1, 2020

First of all, thanks for this extension, I found it very useful in my work!

I upgraded python → 3.8 and jupyter and currently cannot load jupyter-black extension if toolbar button is enabled. In javascript console I have the following error message:

[jupyter-black] – "error loading:"
TypeError: undefined is not an object (evaluating 'action.help') — toolbar.js:98
on_error — kernel_exec_on_cell.js:352
promiseReactionJob
toolbar.js:98

The corresponding source code:

                var button  = $('<button/>')
                    .addClass('btn btn-default')
                    .attr("aria-label", el.label)
                    .attr("title", i18n.msg._(action.help)||el.label)
                    .append(
                        $("<i/>").addClass(el.icon||(action||{icon:'fa-exclamation-triangle'}).icon).addClass('fa')
                    );

If I disable toolbar button, extension is loaded and working with hotkey.

@a0th
Copy link

a0th commented Aug 3, 2020

Im having the same issue, although my message seem different. Like @ischurov mentioned, the shortcut will work if you disable the toolbar addition

Exception in event handler for kernel_ready.Kernel TypeError: Cannot read property 'help' of undefined
    at main.min.js?v=142ed316196fd3eff14daef5cac87ab9:44729
    at Array.forEach (<anonymous>)
    at MainToolBar.ToolBar.add_buttons_group (main.min.js?v=142ed316196fd3eff14daef5cac87ab9:44716)
    at KernelExecOnCells.add_toolbar_button (kernel_exec_on_cell.js?v=20200803182054:192)
    at KernelExecOnCells.setup_for_new_kernel (kernel_exec_on_cell.js?v=20200803182054:284)
    at window._Events.<anonymous> (kernel_exec_on_cell.js?v=20200803182054:349)
    at window._Events.dispatch (main.min.js?v=142ed316196fd3eff14daef5cac87ab9:2)
    at window._Events.v.handle (main.min.js?v=142ed316196fd3eff14daef5cac87ab9:2)
    at Object.trigger (main.min.js?v=142ed316196fd3eff14daef5cac87ab9:2)
    at window._Events.<anonymous> (main.min.js?v=142ed316196fd3eff14daef5cac87ab9:2)

@rgbkrk
Copy link

rgbkrk commented Aug 12, 2020

This issue is happening with a newer release of the jupyter notebook. The upstream fix is here: jupyter/notebook#5676

@rgbkrk
Copy link

rgbkrk commented Aug 14, 2020

Please upgrade to notebook 6.1.4 and let me know if it fixes the issue.

@HaHeho
Copy link

HaHeho commented Sep 18, 2020

Installing notebook'>=6.1.4' from conda-forge fixed the problem for me.

@ischurov
Copy link
Author

I confirm, it works now. Thanks a lot! Closing this.

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

No branches or pull requests

4 participants