[IPython-dev] Camera widget

Jason Grout jason-sage@creativetrax....
Wed Feb 26 20:59:15 CST 2014


It's a bit difficult to debug these sorts of errors since the comm 
infrastructure catches them, so it's hard to stop on them.  But here's 
how I do it:

* open up the dev tools (in Chrome)
* Open up the Sources tab
* On the right, click the stop sign until it's blue (i.e., pause on all 
exceptions; see 
http://stackoverflow.com/questions/2233339/javascript-is-there-a-way-to-get-chrome-to-break-on-all-errors/17324511#17324511)
* run the code.  It should break where the exception is thrown and open 
up the appropriate file and line.  You can then poke around on the 
console and/or hover over variables to try to narrow down the problem.

I'm updating to the current master to see if I can see the problem.

Thanks,

Jason



On 2/26/14 8:00 PM, Doug Blank wrote:
> Thanks for the hint... I did not know about that hard reset. However,
> this is looking like an error. After a reset, in the console:
>
> View creation failed
> Backbone.Model.extend.constructor {widget_manager: WidgetManager,
> _buffered_state_diff: Object, pending_msgs: 0, msg_buffer: null,
> key_value_lock: null…}
> manager.js:83
>
> Exception in Comm callback
> TypeError {stack: "TypeError: Cannot read property '$el' of null↵
> …min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488)", message: "Cannot
> read property '$el' of null"}
>
> message: "Cannot read property '$el' of null"
> stack: "TypeError: Cannot read property '$el' of null↵ at
> WidgetManager._handle_display_view
> (http://127.0.0.1:8888/static/widgets/js/manager.js:97:58)↵ at
> WidgetManager.display_view
> (http://127.0.0.1:8888/static/widgets/js/manager.js:87:26)↵ at
> Backbone.Model.extend._handle_comm_msg
> (http://127.0.0.1:8888/static/widgets/js/widget.js:85:41)↵ at
> x.isFunction.i
> (http://127.0.0.1:8888/static/components/jquery/jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488)↵
> at Comm._maybe_callback
> (http://127.0.0.1:8888/static/services/kernels/js/comm.js?v=f6acfac4110c05a2d4985876fb49765a:177:17)↵
> at Comm.handle_msg
> (http://127.0.0.1:8888/static/services/kernels/js/comm.js?v=f6acfac4110c05a2d4985876fb49765a:185:14)↵
> at CommManager.comm_msg
> (http://127.0.0.1:8888/static/services/kernels/js/comm.js?v=f6acfac4110c05a2d4985876fb49765a:116:18)↵
> at x.isFunction.i
> (http://127.0.0.1:8888/static/components/jquery/jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488)↵
> at Kernel._handle_iopub_message
> (http://127.0.0.1:8888/static/services/kernels/js/kernel.js?v=6af87c42924701bcbf66ba75f4975cec:573:13)↵
> at WebSocket.x.isFunction.i
> (http://127.0.0.1:8888/static/components/jquery/jquery.min.js?v=ccd0edd113b78697e04fb5c1b519a5cd:4:5488)"
> __proto__: Error
>
> -Doug
>
> On Wed, Feb 26, 2014 at 8:32 PM, Sylvain Corlay
> <sylvain.corlay@gmail.com <mailto:sylvain.corlay@gmail.com>> wrote:
>
>     Hi Doug,
>     I have experienced this kind of problems with widgets not being
>     rendered because of caching issues of Chrome. Even after deleting
>     the cache, some javascript files are still not updated to the last
>     version.
>     The fix for me is to
>       -open the developer tools (Crtl + Shift + J)
>       -right-click on the reload button of the page
>       -choose _"Empty Cache and Hard Reload_".
>     Another solution which only works when the developer tools are kept
>     open is to check "_Disable cache (while DevTools is open)_" in the
>     developer tools options.
>     Best,
>     Sylvain
>
>
>     On Wed, Feb 26, 2014 at 8:02 PM, Doug Blank <doug.blank@gmail.com
>     <mailto:doug.blank@gmail.com>> wrote:
>
>         On Wed, Feb 26, 2014 at 6:13 PM, Jason Grout
>         <jason-sage@creativetrax.com
>         <mailto:jason-sage@creativetrax.com>> wrote:
>
>             On 2/26/14 4:25 PM, Doug Blank wrote:
>              > Jason, thank you very much for sharing this!
>              >
>              > So, I am testing this with IPython 2.0.0-dev master, and
>             after three
>              > clicks, it no longer updates the imageurl field. The
>             picture continues
>              > to be updated in the view, both live, and when the
>             picture is taken. But
>              > it appears that the data is no longer being sent to the
>             kernel.
>              >
>              > I have a feeling that this is because the frontend is not
>             receiving a
>              > proper message back from the kernel (because auto
>             throttling kicks in).
>              > This is my guess, anyway.
>              >
>              > Can you verify that you are also having this issue, and
>             perhaps suggest
>              > what could be the matter.
>
>             I'm running pretty close to master, and don't see it with
>             this updated
>             version:
>
>             http://nbviewer.ipython.org/gist/jasongrout/9210458
>
>             (I didn't double-check the version I sent out earlier just
>             now...it's
>             possible that one of the changes I made in the sagecell
>             tweaks included
>             in the above version fixed the issue you are having)
>
>
>         I'm seeing strange behavior in the latest pull (from today's
>         changes in master) with all of the custom widgets. For example,
>         the widgets in "Part 6 Custom Widgets" in the examples are not
>         rendering anymore.
>
>         Any one else seeing that? Perhaps I need to recreate my
>         profiles? The Camera widget no longer shows as well.
>
>         -Doug
>
>             Thanks,
>
>             Jason
>
>             _______________________________________________
>             IPython-dev mailing list
>             IPython-dev@scipy.org <mailto:IPython-dev@scipy.org>
>             http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
>
>         _______________________________________________
>         IPython-dev mailing list
>         IPython-dev@scipy.org <mailto:IPython-dev@scipy.org>
>         http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
>
>     _______________________________________________
>     IPython-dev mailing list
>     IPython-dev@scipy.org <mailto:IPython-dev@scipy.org>
>     http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
>
>
> _______________________________________________
> IPython-dev mailing list
> IPython-dev@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>



More information about the IPython-dev mailing list