CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Community Contributions (https://www.cfd-online.com/Forums/openfoam-community-contributions/)
-   -   [PyFoam] notebook with Pyfoam: case not working + deprecated widget warning (https://www.cfd-online.com/Forums/openfoam-community-contributions/192058-notebook-pyfoam-case-not-working-deprecated-widget-warning.html)

jf_vt August 27, 2017 10:05

notebook with Pyfoam: case not working + deprecated widget warning
 
Hi
I am using pyFoamIPythonNotebook.py to initialize jupyter notebook to postprocess cases
Doing so ,I run in 2 issues that might be related.

1-When executed for the first time, the cell
Code:

from PyFoam.IPythonHelpers.Case import Case
return the warning:
Code:

/home/jf/anaconda2/lib/python2.7/site-packages/IPython/html.py:14: ShimWarning: The `IPython.html` package has been deprecated since IPython 4.0. You should import from `notebook` instead. `IPython.html.widgets` has moved to `ipywidgets`.
  "`IPython.html.widgets` has moved to `ipywidgets`.", ShimWarning)

and I dont understand the recommendation this warning carries:
Code:

You should import from `notebook` instead.
by the way ipydgets and mathJax are installed inmyenvironment.

Now ignoring this warning and continuing
I notice that all the cells
case.timelineSelector or case.pickledPlotSelector
fail with the same error
Code:

AttributeError                            Traceback (most recent call last)
<ipython-input-18-cdb75a748b1b> in <module>()
----> 1 case.timelineSelector('postProcessing/patchExpression_CO2')

/home/jf/foam/foam-extend-4.0/ThirdParty/packages/PyFoam-0.6.4/platforms/noarch/lib/python2.7/site-packages/PyFoam/IPythonHelpers/Case.pyc in timelineSelector(self, directoryName)
    205    def timelineSelector(self,directoryName):
    206        info=self.timelineInfo(directoryName)
--> 207        lst=[widgets.LatexWidget(value="Fields:")]
    208        fieldsSelected=set()
    209        storeButton=widgets.ButtonWidget(description="Store to",disabled=True)

/home/jf/anaconda2/lib/python2.7/site-packages/IPython/utils/shimmodule.pyc in __getattr__(self, key)
    90            return import_item(name)
    91        except ImportError:
---> 92            raise AttributeError(key)

AttributeError: LatexWidget

apparently related to a widget (so related to 1 above..?)

Is is a known behavior
and is there a way to fix it?
Thanks
JF


All times are GMT -4. The time now is 17:24.