<div dir="auto">I’ll check my browser network tab.</div><div dir="auto"><br></div><div dir="auto">Thanks </div><div dir="auto"><br></div><div dir="auto">John</div><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 19, 2023 at 8:22 AM Vincent Marchetti <<a href="mailto:vmarchetti@kshell.com">vmarchetti@kshell.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">John<br>
<br>
Your statement that "Sometimes the packages fail to import" along with the tbe console report "Control comm did not respond in time" make me think this is a problem of a slow server, or slow netrwork, which<br>
is running up against a timeout limit. I don't think it's an intrinsic failure of Mojo. On the other hand, I don't know a workaround, sounds like the Mojo playground needs more capacity.<br>
<br>
Vince<br>
<br>
<br>
> On Jun 19, 2023, at 8:20 AM, John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
> <br>
> Vincent, I am trying to duplicate this with Mojo Python in Mojo Playground JupyterHub.  Sometimes the packages fail to import.  Here's my python code:<br>
> <br>
> <br>
> from IPython import display, HTML<br>
> import x3d<br>
> from x3d import X3D<br>
> from x3d import metaDiagnostics<br>
> <br>
> # snip, add newModel to context instead of this comment.<br>
> <br>
> str = newModel.Scene.HTML5()<br>
> <br>
> x3dnode = """<br>
> <script type='text/javascript' charset="UTF-8" src='<a href="https://x3dom.org/release/x3dom-full.debug.js" rel="noreferrer" target="_blank">https://x3dom.org/release/x3dom-full.debug.js</a>'> </script> <br>
> <link rel='stylesheet' type='text/css' href='<a href="https://x3dom.org/release/x3dom.css" rel="noreferrer" target="_blank">https://x3dom.org/release/x3dom.css</a>'></link> <br>
> <style><br>
>  x3d {<br>
>      width:720px;<br>
>      height:720px;<br>
>      border:2px solid black;<br>
> }<br>
> </style><x3d>"""+str+"""<br>
> </x3d><br>
> <script><br>
> window.x3dom.reload()<br>
> </script>"""<br>
> <br>
> HTML(x3dnode)<br>
> <br>
> <br>
> # not sure what I'm doing wrong???<br>
> <br>
> Could this console problem mean something?<br>
> <br>
> Failed to fetch ipywidgets through the "jupyter.widget.control" comm channel, fallback to fetching individual model state. Reason: Control comm did not respond in time<br>
> _loadFromKernel @ 150.3e1e5adfd821b9b96340.js?v=3e1e5adfd821b9b96340:1<br>
> <br>
> Search for Mojo Playground in google, if you are already enrolled.<br>
> <br>
> Thanks!<br>
> <br>
> John<br>
> <br>
> <br>
> <br>
> On Wed, Dec 21, 2022 at 3:16 PM Vincent Marchetti <<a href="mailto:vmarchetti@kshell.com" target="_blank">vmarchetti@kshell.com</a>> wrote:<br>
> A problem with the Jupyter notebook attached in this email was that the entire XML document, including the <xml...> declaration, was inserted into the <x3d> node for X3DOM to interpret, and that failed.<br>
> <br>
> There seem to be as many ways of inserting an <x3d> node for X3DOM into an notebook as there are authors, but the method I use is illustrated at<br>
> <br>
> <a href="https://github.com/vincentmarchetti/web3d2021_jupyter_tutorial/blob/main/HelloWorld.ipynb" rel="noreferrer" target="_blank">https://github.com/vincentmarchetti/web3d2021_jupyter_tutorial/blob/main/HelloWorld.ipynb</a> <br>
> <br>
> which is an attempt at illustrating the intent of John's notebook, to prepare the HelloWorld scene using the X3D python module, and then to render it in the notebook.<br>
> <br>
> I did note two problems in fully rendering the HelloWorld scene, pertaining to loading the image texture from the <a href="http://web3d.org" rel="noreferrer" target="_blank">web3d.org</a> site<br>
> 1. X3DOM only tries the first URL in the ImageTexture url field<br>
> 2. Even if the <a href="http://web3d.org" rel="noreferrer" target="_blank">web3d.org</a> url is put first, the <a href="http://web3d.org" rel="noreferrer" target="_blank">web3d.org</a> server is not configured to support the strict CORS protocol. As a result, the Firefox brower will retrieve the the image from <a href="http://web3d.org" rel="noreferrer" target="_blank">web3d.org</a>, but will not allow the x3dom code to see that data.<br>
> <br>
> The notebook referenced above from github will render the earth as a sphere and show the text in the X3D scene.<br>
> <br>
> Vince Marchetti<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> > On Dec 21, 2022, at 5:08 AM, John Carlson <<a href="mailto:yottzumm@gmail.com" target="_blank">yottzumm@gmail.com</a>> wrote:<br>
> > <br>
> > <br>
> > <HelloWorld.ipynb>_______________________________________________<br>
> > x3d-public mailing list<br>
> > <a href="mailto:x3d-public@web3d.org" target="_blank">x3d-public@web3d.org</a><br>
> > <a href="http://web3d.org/mailman/listinfo/x3d-public_web3d.org" rel="noreferrer" target="_blank">http://web3d.org/mailman/listinfo/x3d-public_web3d.org</a><br>
> <br>
<br>
</blockquote></div></div>