Jupyter Lab issue displaying widgets (javascript error) - javascript

I have troubles replicating a Jupyter Lab install on a new PC. It is working fine on my previous one.
I am unable to display simple widgets (like a checkbox from ipywidgets or ipyvuetify).
I checked that jupyter-widgets is enable with jupyter labextension list. The results is :
jupyter-vue v1.7.0 enabled ok
jupyter-vuetify v1.8.4 enabled ok
#jupyter-widgets/jupyterlab-manager v5.0.2 enabled ok (python, jupyterlab_widgets)
In the notebook, when i try to display a widget, the cell display a Javascrip error :
[Open Browser Console for more detailed log - Double click to close this message]
Failed to load model class 'CheckboxModel' from module '#jupyter-widgets/controls'
Error: Module #jupyter-widgets/controls, version ^1.5.0 is not registered, however,
2.0.0 is
at f.loadClass (http://localhost:8888/lab/extensions/#jupyter-widgets/jupyterlab-
manager/static/134.083e6b37f2f7b2f04b5e.js?v=083e6b37f2f7b2f04b5e:1:74976)
at f.loadModelClass (http://localhost:8888/lab/extensions/#jupyter-widgets/jupyterlab-
manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:10721)
at f._make_model (http://localhost:8888/lab/extensions/#jupyter-widgets/jupyterlab-
manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:7517)
at f.new_model (http://localhost:8888/lab/extensions/#jupyter-widgets/jupyterlab-
manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:5137)
at f.handle_comm_open (http://localhost:8888/lab/extensions/#jupyter-widgets/jupyterlab-
manager/static/150.467514c324d2bcc23502.js?v=467514c324d2bcc23502:1:3894)
at _handleCommOpen (http://localhost:8888/lab/extensions/#jupyter-widgets/jupyterlab-
manager/static/134.083e6b37f2f7b2f04b5e.js?v=083e6b37f2f7b2f04b5e:1:73392)
at b._handleCommOpen (http://localhost:8888/static/lab/jlab_core.86360d749a1ef5f29afb.js?
v=86360d749a1ef5f29afb:2:924842)
at async b._handleMessage
(http://localhost:8888/static/lab/jlab_core.86360d749a1ef5f29afb.js?
v=86360d749a1ef5f29afb:2:926832)

That error is consistent with one noted here in an issue report recently. The suggestion there is to change to ipywidgets version 7.7.2 or 7.6.5 to fix this issue. Also, see the note here, too.

Related

electron app is getting 34352:0406/075851.692:ERROR:CONSOLE(6)] "console.assert"

In my electron app I'd like to use console.trace() but want it to be collapsed by default. For that I use this in renderer process:
{
const {groupCollapsed, groupEnd, trace} = console;
console.trace = ((...args:any[]) =>
{
groupCollapsed(...args);
trace("");
groupEnd();
}).bind(console);
}
It works ok (time to time few messages from async functions getting grouped together), however in main process I'm bombarded by these messages (each trace call generates several lines):
[34352:0406/075851.692:ERROR:CONSOLE(6)] "console.assert", source: devtools://devtools/bundled/panels/console/console.js (6)
I'm unable reproduce this exact message with an electron snippet using electron v18.0.2, but it shows similar message instead:
[5636:0406/083113.750:INFO:CONSOLE(5)] "test", source: file:///C:/Users/dev/AppData/Local/Temp/tmp-34776-vztptWEofKLe/renderer.js (5)
[5636:0406/083113.751:INFO:CONSOLE(7)] "console.groupEnd", source: file:///C:/Users/dev/AppData/Local/Temp/tmp-34776-vztptWEofKLe/renderer.js (7)
so how can I see where that error is coming from (aka devtools://devtools/bundled/panels/console/console.js) and most importantly how to suppress it?
[EDIT]
This seems to have nothing to do with me replacing console.trace. It seems the issue is in electron itself. The last version that didn't have this issue was 18.0.0-alpha.5, since 18.0.0-beta.1 these messages appear. If I clear developer tools console, the messages stop for a while, but after some time they start showing up again with each message in dev tools.

Exception when starting axelor-erp, web on eclipse

I’m running at the first time axelor-erp (web project) on eclipse. I downloaded code from github, configured PostGreSql and then started the project using gradle.
When starting, I got this exception: Exception starting filter [guiceFilter]
org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [com.axelor.apps.base.tracking.GlobalAuditInterceptor] as strategy [org.hibernate.Interceptor]
Any help please?
Exception starting filter [guiceFilter]
org.hibernate.boot.registry.selector.spi.StrategySelectionException: Unable to resolve name [com.axelor.apps.base.tracking.GlobalAuditInterceptor] as strategy [org.hibernate.Interceptor]
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.selectStrategyImplementor(StrategySelectorImpl.java:126)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:194)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveDefaultableStrategy(StrategySelectorImpl.java:152)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveDefaultableStrategy(StrategySelectorImpl.java:139)
at org.hibernate.boot.registry.selector.internal.StrategySelectorImpl.resolveStrategy(StrategySelectorImpl.java:133)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl$SessionFactoryOptionsStateStandardImpl.determineInterceptor(SessionFactoryBuilderImpl.java:794)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl$SessionFactoryOptionsStateStandardImpl.<init>(SessionFactoryBuilderImpl.java:610)
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.<init>(SessionFactoryBuilderImpl.java:81)
at org.hibernate.boot.internal.MetadataImpl.getSessionFactoryBuilder(MetadataImpl.java:135)
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:885)
at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:58)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
at com.google.inject.persist.jpa.JpaPersistService.start(JpaPersistService.java:110)
at com.google.inject.persist.PersistFilter.init(PersistFilter.java:77)
at com.google.inject.servlet.FilterDefinition.init(FilterDefinition.java:110)
at com.google.inject.servlet.ManagedFilterPipeline.initPipeline(ManagedFilterPipeline.java:98)
at com.google.inject.servlet.GuiceFilter.init(GuiceFilter.java:232)
at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281)
at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262)
at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:106)
at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4548)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5193)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1412)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1402)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2020-11-09 15:16:35.794 ERROR 11680 --- [ost-startStop-1] o.apache.catalina.core.StandardContext : One or more Filters failed to start. Full details will be found in the appropriate container log file
2020-11-09 15:16:35.794 ERROR 11680 --- [ost-startStop-1] o.apache.catalina.core.StandardContext : Context [/axelor-erp] startup failed due to previous errors
The back-end modules are not well configured with the project.

Error "validate_display:255 error 3008 (EGL_BAD_DISPLAY)" by Toutorial

I'm new to javascript and android and I want to program a multi page app with SAPUI5. For this I found a tutorial:
https://sapui5.hana.ondemand.com/sdk/#docs/guide/df86bfbeab0645e5b764ffa488ed57dc.html
which works fine, up to Walk through - Step 8. I have exactly the same source code in my project, but it doesn't work. I get following errors:
E/Zygote: MountEmulatedStorage()
E/Zygote: v2
E/SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
E/SysUtils: ApplicationContext is null in ApplicationStatus
E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
E/AndroidProtocolHandler: Unable to open asset URL: file:///android_asset/i18n/i18n_de_DE.properties
I know the first and the second, but I don't find information for the rest.
Does anybody know where they come from and how to solve it?
Answere:
I don't know what the problem actually was. I tried with the SDK-versions and get many many gradle errors. After I solved it, I used the code out of Step 7 an added only the yellow colored lines and delete what was to delete.
Not related to sapui
Don't know whether it will help others or not.
I've got this error when I was trying to open a pdf file in webview by using google docs.
I've changed
webView.loadUrl(url);
to
webView.loadUrl("http://docs.google.com/gview?embedded=true&url=" + url);
and it worked.
The last error seems to occur because the file /android_asset/i18n/i18n_de_DE.properties is either not there or maybe locked?
Maybe you misspelled it?
The EGL_BAD_DISPLAY error could have something to do with the DPI. Maybe this link helps:
http://forum.xda-developers.com/showthread.php?t=2212632
I had the same issue when I tried to load webview on Dialog. If I load webview on activity, it works well.
I had the same problem, some time pdf load or some time not.
try this solved my problem.
public void onPageFinished(WebView view, String url) {
super.onPageFinished(view, url);
if(view.getContentHeight() == 0){
view.reload();
} else {
pDialog.dismiss();
}
}

Getting the contents of the toolbar search box using the Mozilla Firefox Add-on SDK

I am developing a Firefox addon and I was wondering how to get the contents of the search box in the toolbar using the Mozila Addon SDK? I finally found the chrome URL where it resides (at least I think: chrome://browser/content/search/...), but I’m still a little unsure as to how to reference this to get the contents of the search box into my addon. I tried: document.getAnonymousElementByAttribute(this, "anonid", "searchbar-textbox"); but this gives a “document is not defined” error, probably because Firefox has no idea what ‘searchbar-textbox’ is and this is outside the scope of the addon (in a different ‘document’). I’m relatively new to addon development, so there’s probably a fairly straight forward way to do this, it is just that this solution is unknown to me. Thanks.
Your "main" module (and other lib/ modules) do not have any document attached. You need to first use some low-level API such as the window/utils .getMostRecentBrowserWindow() function to obtain the DOMWindow for the active browser window. After that it's just getting the #searchbar element and checking the .value property (exposed through XBL).
Complete example:
const {getMostRecentBrowserWindow} = require("window/utils");
require("sdk/widget").Widget({
id: "log-search-field",
label: "Log Search Field",
contentURL: "http://www.mozilla.org/favicon.ico",
onClick: function() {
let win = getMostRecentBrowserWindow();
console.error("Search text: " + win.document.getElementById("searchbar").value);
}
});

SCRIPT5 : Access is denied on IE-10 after Security Update : jquery-1.4.4.min.js

There was an IE-10 security update on Sept-10. After that, in my application there seems to be an issue accessing a standard div using jquery.
Here is the quick scenario :
I have a jsp layout template where there is a div defined :
<div id="abc"></div>
In that I include a js file k1.js, the following function in that is triggered upon a click of a button
function sample() {
jQuery.get("/fetchmedata.do?a=true", function(data) {
jQuery("#abc").html(data);
});
This was totally functioning across all browsers including ie-10 till Sept -10. After 10th, it still works fine on IE-9 and old IE-10 builds, but on new IE-10 build throws the error in console :
SCRIPT5 : Access is denied
The call stack pointed to internals of Jquery code which I couldn't decipher/understand the context.
The quick fix was to replace the jquery with Javascript, and it worked :
function sample() {
jQuery.get("/fetchmedata.do?a=true", function(data) {
document.getElementById('abc').innerHTML = data;
});
The jquery version was jquery-1.4.4.min.js.
Please advice on what could have been the issue, is it again probably related to not using XDomainRequest instead of XHR, so that we could take precautions in the code to avoid future issues.
Also what is the best practices around it ?
Please advice.

Categories

Resources