CERBSim / webgui_jupyter_widgets

GNU Lesser General Public License v2.1
5 stars 3 forks source link

need bugfix release for 0.2.13 #2

Closed francesco-ballarin closed 2 years ago

francesco-ballarin commented 2 years ago

Follow up to #1. With the new release:

Traceback:

---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
/tmp/ipykernel_8551/978162932.py in <module>
----> 1 Draw(mesh)

/usr/local/lib/python3.7/dist-packages/ngsolve/webgui.py in Draw(mesh_or_func, mesh_or_none, name, order, min, max, draw_vol, draw_surf, autoscale, intpoints, deformation, interpolate_multidim, animate, clipping, vectors, js_code, eval_function, eval, filename, objects, nodal_p1, settings)
    563         if wg._IN_GOOGLE_COLAB:
    564             from IPython.display import display, HTML
--> 565             html = scene.GenerateHTML()
    566             display(HTML(html))
    567         else:

/usr/local/lib/python3.7/dist-packages/webgui_jupyter_widgets/widget.py in GenerateHTML(self, filename, template)
     57     def GenerateHTML(self, filename=None, template=None):
     58         self.encoding = 'b64'
---> 59         return html.GenerateHTML(self.GetData(), filename, template)
     60 
     61     def MakeScreenshot(self, filename, width=1200, height=600):

/usr/local/lib/python3.7/dist-packages/webgui_jupyter_widgets/html.py in GenerateHTML(data, filename, template)
     66         template = getHTML()
     67     import json
---> 68     self.encoding = 'b64'
     69     d = self.GetData()
     70 

NameError: name 'self' is not defined

The error looks legitimate, and only seems to affect Colab.

francesco-ballarin commented 2 years ago

Fixed in v0.2.14