PyNGL & PyNIO version error

From: <gary.bates_at_nyahnyahspammersnyahnyah>
Date: Tue Jul 19 2011 - 15:13:18 MDT

hi,
I'm getting this msg from both Nio and Ngl today. The Nio error is
occurring in a cron script I've been running daily for many months.

> batchb> /usr/local/bin/python
> Python 2.5.5 (r255:77872, Oct 8 2010, 15:05:10)
> [GCC 4.4.4] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import Ngl
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/local/lib/python2.5/site-packages/PyNGL/Ngl.py", line 100, in
> <module>
> IS_NEW_MA = _get_integer_version(numpy.__version__) > 10004
> File "/usr/local/lib/python2.5/site-packages/PyNGL/Ngl.py", line 97, in
> _get_integer_version
> v = int(d[0]) * 10000 + int(d[1]) * 100 + int(d[2])
> ValueError: invalid literal for int() with base 10: '1rc3'

I'm getting this error on a linux machine. Can I just comment out this
line to get around it?

Thanks,
Gary

attached mail follows:


On 7/19/11 1:26 PM, Gary Bates wrote:
> Jeff,
> pygrib is fine batchb, but there's something wrong with version # of Ngl:
>
> batchb> /usr/local/bin/python
> Python 2.5.5 (r255:77872, Oct 8 2010, 15:05:10)
> [GCC 4.4.4] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import Ngl
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/local/lib/python2.5/site-packages/PyNGL/Ngl.py", line 100, in
> <module>
> IS_NEW_MA = _get_integer_version(numpy.__version__) > 10004
> File "/usr/local/lib/python2.5/site-packages/PyNGL/Ngl.py", line 97, in
> _get_integer_version
> v = int(d[0]) * 10000 + int(d[1]) * 100 + int(d[2])
> ValueError: invalid literal for int() with base 10: '1rc3'
>
>
> My script works with python2.6.6 on the macs. What if we installed that
> on batchb?
>
> -Gary

Looks like a bug in PyNGL (it's trying to apply int to a numpy version
string with non-numeric chars in it). Perhaps it works on the macs
because the numpy version does not have 'rc3' in it?

How about using matplotlib/basemap for plotting (it's installed on batchb)?

-Jeff

-- 
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : Jeffrey.S.Whitaker@noaa.gov
325 Broadway                Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg

_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Tue Jul 19 15:13:22 2011

This archive was generated by hypermail 2.1.8 : Fri Jul 29 2011 - 08:51:37 MDT