<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
I'm not able to reproduce the error, I was able to rerun it without
restarting the kernel. Maybe it would be a good idea to delete those
lines which are not needed like import of modules you are not using.
Start with a short clean script and use more code cells. If you want
to display the plot inline you can produce a PNG file, see attached
notebook. <br>
<br>
-Karin<br>
<br>
<div class="moz-cite-prefix">Am 09.07.19 um 19:18 schrieb Mark
England:<br>
</div>
<blockquote type="cite"
cite="mid:88CF2D71-D453-4340-8544-54745CEB2A05@gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
Hi Karin,
<div class=""><br class="">
</div>
<div class="">Attached. It is very simple and doesn’t need any
data (just map plotting). </div>
<div class="">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.</div>
<div class=""><br class="">
</div>
<div class="">Mark<br class="">
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 9 Jul 2019, at 10:02, Karin Meier-Fleischer
<<a href="mailto:meier-fleischer@dkrz.de" class=""
moz-do-not-send="true">meier-fleischer@dkrz.de</a>>
wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="Content-Type" content="text/html;
charset=UTF-8" class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode:
space; line-break: after-white-space;" class="">Hi Mark,
<div class=""><br class="">
</div>
<div class="">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?</div>
<div class=""><br class="">
</div>
<div class="">-Karin<br class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">Am 09.07.2019 um 18:52 schrieb Mark
England via pyngl-talk <<a
href="mailto:pyngl-talk@ucar.edu" class=""
moz-do-not-send="true">pyngl-talk@ucar.edu</a>>:</div>
<br class="Apple-interchange-newline">
<div class="">
<meta http-equiv="Content-Type"
content="text/html; charset=UTF-8" class="">
<div style="word-wrap: break-word;
-webkit-nbsp-mode: space; line-break:
after-white-space;" class="">
<div class="">Hi there,</div>
<div class=""><br class="">
</div>
<div class="">I am trying to transition to
using PyNGL (using Jupiter Notebook, Python
v3.7.3) on my Mac (Mojave 10.14.5).</div>
<div class="">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.</div>
<div class="">However if I re-run the plotting
section of code in the Notebook, I get this
error:</div>
<div class=""><br class="">
</div>
<div class="">
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:["Error.c":406]:ErrorInitialize:Only
one instance of ErrorClass is supported</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:Unable to
initialize layer-Can't Create</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:Error
Creating ErrorClass object</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:Unable to
initialize layer-Can't Create</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:Unable to
initialize layer-Can't Create</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:_NhlCreate:Unable
to access "default" App object</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:_NhlCreate:Invalid
Parent id #-4</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:NhlGetValues:PID
#-4 is invalid</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:PID #-4
can't be found in NhlSetValues</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">warning:maximize_plots:
Invalid workstation. No plot
maximization can take place.</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:NhlDraw:
Invalid Layer Id: -4</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:Unable to
update Workstation with PID#-4</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:Unable to
clear Workstation with PID#-4</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:NhlDraw:
Invalid Layer Id: -4</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:Unable to
update Workstation with PID#-4</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:Unable to
clear Workstation with PID#-4</span></div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;">fatal:Unable to
Destroy (Bad PID#0)</span></div>
</div>
<div class="" style="margin: 0px;
font-stretch: normal; font-size: 11px;
line-height: normal; font-family: Menlo;"><span
class="" style="font-variant-ligatures:
no-common-ligatures;"><br class="">
</span></div>
<span class="">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.</span>
<div class=""><span class=""><br class="">
</span></div>
<div class=""><span class="">Thanks,</span></div>
<div class=""><span class=""><br class="">
</span></div>
<div class=""><span class="">Mark</span></div>
</div>
_______________________________________________<br
class="">
pyngl-talk mailing list<br class="">
List instructions, subscriber options,
unsubscribe:<br class="">
<a
href="http://mailman.ucar.edu/mailman/listinfo/pyngl-talk"
class="" moz-do-not-send="true">http://mailman.ucar.edu/mailman/listinfo/pyngl-talk</a></div>
</blockquote>
</div>
<br class="">
<div class="">
<div style="letter-spacing: normal; text-align:
start; text-indent: 0px; text-transform: none;
white-space: normal; word-spacing: 0px;
-webkit-text-stroke-width: 0px; word-wrap:
break-word; -webkit-nbsp-mode: space; line-break:
after-white-space;" class="">
<div style="letter-spacing: normal; text-align:
start; text-indent: 0px; text-transform: none;
white-space: normal; word-spacing: 0px;
-webkit-text-stroke-width: 0px; word-wrap:
break-word; -webkit-nbsp-mode: space;
line-break: after-white-space;" class=""><br
class="">
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color:
rgb(0, 0, 0); letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space: normal;
word-spacing: 0px; -webkit-text-stroke-width: 0px;
text-decoration: none; word-wrap: break-word;
-webkit-nbsp-mode: space; line-break: after-white-space;"
class="">
<div dir="auto" style="color: rgb(0, 0, 0); letter-spacing:
normal; text-align: start; text-indent: 0px;
text-transform: none; white-space: normal; word-spacing:
0px; -webkit-text-stroke-width: 0px; word-wrap:
break-word; -webkit-nbsp-mode: space; line-break:
after-white-space;" class="">
<div dir="auto" style="word-wrap: break-word;
-webkit-nbsp-mode: space; line-break:
after-white-space;" class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica;
font-size: 12px; font-style: normal;
font-variant-caps: normal; font-weight: normal;
letter-spacing: normal; text-align: start;
text-indent: 0px; text-transform: none; white-space:
normal; word-spacing: 0px; -webkit-text-stroke-width:
0px;">
<div class="" style="font-variant-ligatures: normal;
font-variant-east-asian: normal;
font-variant-position: normal; line-height: normal;"><font
class="" face="Garamond" color="#747474">Mark
England, PhD.</font></div>
<div class="" style="font-variant-ligatures: normal;
font-variant-east-asian: normal;
font-variant-position: normal; line-height: normal;"><font
class="" face="Garamond" color="#747474">Columbia
University,</font></div>
<div class="" style="font-variant-ligatures: normal;
font-variant-east-asian: normal;
font-variant-position: normal; line-height: normal;"><font
class="" face="Garamond" color="#747474"><i
class="">Bakhmeteff Research Fellow in Fluid
Mechanics, </i></font></div>
<div class="" style="font-variant-ligatures: normal;
font-variant-east-asian: normal;
font-variant-position: normal; line-height: normal;"><font
class="" face="Garamond" color="#747474">Email: <a
href="mailto:mre2126@columba.edu" class=""
moz-do-not-send="true">mre2126@columbia.edu</a>, <a
href="mailto:markengland20@gmail.com" class=""
moz-do-not-send="true">markengland20@gmail.com</a></font></div>
<div class="" style="font-variant-ligatures: normal;
font-variant-east-asian: normal;
font-variant-position: normal; line-height: normal;"><font
class="" face="Garamond" color="#747474">Website: <a
href="http://markrossengland.com" class=""
moz-do-not-send="true">markrossengland.com</a></font></div>
</div>
</div>
</div>
</div>
</div>
<br class="">
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Dipl. Geophys. Karin Meier-Fleischer
Visualization, NCL, CDO, PyNGL
Application Support
Deutsches Klimarechenzentrum GmbH (DKRZ)
Bundesstrasse 45a - D20146 Hamburg - Germany
Phone: +49 (0)40 460094 126
Fax: +49 (0)40 460094 270
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:meier-fleischer@dkrz.de">meier-fleischer@dkrz.de</a>
URL: <a class="moz-txt-link-abbreviated" href="http://www.dkrz.de">www.dkrz.de</a>
Geschäftsführer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784
</pre>
</body>
</html>