[pyngl-talk] Problems with plotting in Jupyter notebook cells

Mark England markengland20 at gmail.com
Tue Jul 9 11:18:39 MDT 2019


Hi Karin,

Attached. It is very simple and doesn’t need any data (just map plotting). 
If you run it once, it should work, however if you rerun the plotting cell (perhaps try to change the latitude or something) it will give you that error.

Mark

> On 9 Jul 2019, at 10:02, Karin Meier-Fleischer <meier-fleischer at dkrz.de> wrote:
> 
> Hi Mark,
> 
> sometimes I have similar problems using notebook and PyNGL running with the same preconditions and have to restart the kernel. I don’t know if it is caused by PyNGL because I get other error messages. Is it possible to send the .ipynb file with test data to try to reproduce your errors?
> 
> -Karin
> 
>> Am 09.07.2019 um 18:52 schrieb Mark England via pyngl-talk <pyngl-talk at ucar.edu <mailto:pyngl-talk at ucar.edu>>:
>> 
>> Hi there,
>> 
>> I am trying to transition to using PyNGL (using Jupiter Notebook, Python v3.7.3) on my Mac (Mojave 10.14.5).
>> I am just trying to create simple plots (code below, mostly taken from the examples online. When I run the script first, it works fine and the pdf is created exactly as advertised. All the relevant modules are loaded.
>> However if I re-run the plotting section of code in the Notebook, I get this error:
>> 
>> fatal:["Error.c":406]:ErrorInitialize:Only one instance of ErrorClass is supported
>> fatal:Unable to initialize layer-Can't Create
>> fatal:Error Creating ErrorClass object
>> fatal:Unable to initialize layer-Can't Create
>> fatal:Unable to initialize layer-Can't Create
>> fatal:_NhlCreate:Unable to access "default" App object
>> fatal:_NhlCreate:Invalid Parent id #-4
>> fatal:NhlGetValues:PID #-4 is invalid
>> fatal:PID #-4 can't be found in NhlSetValues
>> warning:maximize_plots: Invalid workstation. No plot maximization can take place.
>> fatal:NhlDraw: Invalid Layer Id: -4
>> fatal:Unable to update Workstation with PID#-4
>> fatal:Unable to clear Workstation with PID#-4
>> fatal:NhlDraw: Invalid Layer Id: -4
>> fatal:Unable to update Workstation with PID#-4
>> fatal:Unable to clear Workstation with PID#-4
>> fatal:Unable to Destroy (Bad PID#0)
>> 
>> I can only get the figure again, if, in the Kernel menu, I ‘restart and run all’. It seems to be a problem with the graphics? I have xQuartz installed. From a similar topic I found online, they removed Ngl.end() at the end, however that doesn’t work for me.
>> 
>> Thanks,
>> 
>> Mark
>> _______________________________________________
>> pyngl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk <http://mailman.ucar.edu/mailman/listinfo/pyngl-talk>
> 

Mark England, PhD.
Columbia University,
Bakhmeteff Research Fellow in Fluid Mechanics, 
Email: mre2126 at columbia.edu <mailto:mre2126 at columba.edu>, markengland20 at gmail.com <mailto:markengland20 at gmail.com>
Website: markrossengland.com <http://markrossengland.com/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20190709/1768c8a8/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Dummy.ipynb
Type: application/octet-stream
Size: 3112 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20190709/1768c8a8/attachment-0001.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/pyngl-talk/attachments/20190709/1768c8a8/attachment-0003.html>


More information about the pyngl-talk mailing list