For a project we try to expand the Google Cloud Datalab with IPyWidgets. When we try out IPyWidgets in jupyter notebook (not in google-cloud-datalab) locally, everything run as expected (i.e. we tried to show a Text field, which worked). When we try to execute the same code in Google Cloud Datalab, it fails. In the web console we see following error:
Error 1:
Error message: "Class ipython.widget not found in registry "
Error stack: "load_class/<#http://localhost:8081/static/notebook/js/main.min.js:12751:28load_class#http://localhost:8081/static/notebook/js/main.min.js:12736:1CommManager.prototype.comm_open#http://localhost:8081/static/notebook/js/main.min.js:21802:31.proxy/i#http://localhost:8081/static/notebook/js/main.min.js:89:5486Kernel.prototype._handle_iopub_message#http://localhost:8081/static/notebook/js/main.min.js:23101:20Kernel.prototype._finish_ws_message#http://localhost:8081/static/notebook/js/main.min.js:22936:1Kernel.prototype._handle_ws_message/this._msg_queue<#http://localhost:8081/static/notebook/js/main.min.js:22926:39"
Error 2:
Message: Could not open comm
Error message: "Couldn't process kernel message"
Error stack: "WrappedError#http://localhost:8081/static/notebook/js/main.min.js:12706:19reject/<#http://localhost:8081/static/notebook/js/main.min.js:12785:33"
The strange thing is, is when google-cloud-datalab is running and we go to the jupyter notebook (on port 9000), and we execute the code over there it works.
Do we need to make changes to nb.html, and/or static.ts to make this work?
Question: Is there a way to execute IPyWidgets on Google Cloud Datalab?
Greetings, Brecht
Edit: I can now load the js and the css files from IPyWidgets in google-cloud-datalab (you need to change static.ts, for those who wonder). The only remaining issue (hopefully), is that we get following error:
"Error: Could not determine where the display message was from. Widget will not be displayed".
This is because
var cell = this.get_msg_cell(msg.parent_header.msg_id);
is null (line 556, of ipywidgets/widgets/js/manager.js). I assume that changing static.ts is not enough?
The:
"Error: Could not determine where the display message was from. Widget will not be displayed".
issue can be fixed by changing this line in datalab.js:
originalExecute.apply(this, [ code, callbacks, options ]);
to:
return originalExecute.apply(this, [ code, callbacks, options ]);
Related
I created a new folder, inside which is a very simple .R file. I load the folder into VSCode and run debugger. The pane showing icons of step over, step into, and step out is activated. However, when clicking step over icon, errors are prompted: "Error in body[[i]][1] : object of type 'symbol' is not subsettable". I cannot find solutions in Google. A screenshot is atttached for referene. What is going wrong here? Thx.
From the linux console I run a windows console tool using:
wine console_tool.exe ....
The console tool does not involve any windows. It's output is just textual.
Some output is added repeatedly after a given delay time.
However, besides the output of the console_tool.exe I get repeatedly the following error message also interleaved with the other output:
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
I already tried to export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 but then the only change is that the error message changes:
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
I also attempted to apt install the :i386 version of the libgtk3-nocsd.so.0 but it doesn't seem to exists.
I don't know why a console application may trigger a gtk error message. This is beyond my knowledge.
My preferred goal would be to tell wine that the .exe does not use windows and it does not need to not use gtk for windows emulation at all. However, as this may not be possible, my second preferred goal would be to solve the gtk issue.
Can you help me achieve at least one of those goals?
I do not know what the error messages mean. However, the wineconsole command runs console executable using wine. Example:
wineconsole console_tool.exe
When I run this script "python3 script.py" everything is alright.
(I tried to run the script as a root, and other user too)
import music21
import os
# "qt.qpa.xcb: could not connect to display"
# "qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found."
os.putenv("QT_QPA_PLATFORM", "offscreen") #handle error above in my case
us = music21.environment.UserSettings()
us['musescoreDirectPNGPath'] = '/usr/bin/musescore3'
score = music21.converter.parse("myfile.musicxml")
score.write('musicxml.pdf', fp='song.pdf')
But when my django backend has to execute this code as a function to respond API call, its not working. I got:
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-myusername'
This plugin does not support propagateSizeHints()
And if I remove part with "QT_QPA_PLATFORM", I got "qt.qpa.xcb" error.
I have not idea what to do.
I also tried to add following line in my gunicorn setup script but nothing changed.
export QT_QPA_PLATFORM=offscreen
Any ideas how to fix it ? What can be wrong ?
Server OS: Ubuntu 20.04
You probably need to also set XDG_RUNTIME_DIR. See https://github.com/cuthbertLab/music21/issues/260#issuecomment-834489173
I installed some new plugin on Paw app (Postman 1 and 2 export, Swagger 2). And since I have this error when I try to make a new export. I tried to uninstall and reinstall only one plugin, and I still have this error.
But before I install some new plugin, I made some export without error.
This is the error I get when I attempt to make an export:
Export Failed
JavaScript Exception: TypeError: undefined is not an object (evaluating 'ds.length') ({
column = 20;
line = 2277;
})
Sorry for the very late follow up. We've been able to reproduce this issue, and release a fix last week.
Please update your Paw extensions by going to the Paw menu > Extensions > Check for Extensions Updates…
This will trigger the updating of all your installed extensions. Then, please try again to export your project, it should be working correctly.
I get the following error while attempting to use the "save hook" functionality in Bosun -
failed to call save hook: fork/exec /tools/bosun/bin/save-hook: exec format error. Restoring config: successful
The file is executable and I've removed all logic from it, and the error still occurs.
Should the file return anything? Or is this a bug?
The documentation indicates it should be successful as long as the hook exits ok.
https://bosun.org/system_configuration#commandhookpath
I would guess the OS is not accepting this as a proper executable?
If a binary, did you compile it on the same system, or make sure your cross compiled it for the right architecture?
If a script, does your script have the bang line at the start, for example #!/bin/bash?