Re: PyNIO error with latest Macports version of python

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 10 2010 - 15:01:28 MST

Hi Jeff and Gary et al.,

I have found that I can reproduce this error when I install the
current version of PyNIO into a Python 2.5 environment. It does not
occur with Python 2.6 and I suspect that is the reason I had not
encountered it in my tests. I will try to track this down as soon as
possible.
  -dave

On Feb 10, 2010, at 2:33 PM, Jeff Whitaker wrote:

> Gary Bates wrote:
>>
>> hi,
>> On Feb 2, our IT group did a 'clean install' of python using
>> Macports.
>> Then they added the versions of PyNio and PyNGl that we'd been using
>> before (from December 2009):
>>
>> PyNGL-1.3.1b1.macosx-10.3-i386.tar.gz
>> PyNIO-1.3.0b3.macosx-10.4-i386.tar.gz
>>
>> This caused a python script -- which had been working successfully
>> everyday for the previous month --- to break in PyNIO. The error
>> comes in the assigning values to a character variable (see below). I
>> don't see why I'm getting this error.
>>
>> We've confirmed that when we return to our previous install of
>> python2.5, the script still runs successfully.
>>
>> I'm running python 2.5.4 on an intel mac (mac OS 10.5.8). The python
>> script is attached.
>>
>> Gary
>
> Here's a much simpler script that triggers the error:
>
> import Nio
> ncfileout = Nio.open_file('testchar.nc','w')
> ncfileout.create_dimension('time', None)
> varout = ncfileout.create_variable('charvar', 'c', ('time',))
> varout[0]='x'
> ncfileout.close()
>
> python testchar.py
> fatal:FileWriteVar: Type mismatch, can't perform assignment
> Traceback (most recent call last):
> File "testchar.py", line 5, in <module>
> varout[0]='x'
> File
> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/
> python2.5/site-packages/PyNIO/Nio.py",
> line 364, in __setitem__
> self._obj[xsel] = value
> SystemError: error return without exception set
>
>
> -Jeff
>>
>>
>>
>>
>> get_jsw_fcsts: datestamp (20100202
>> ) LT model_run (20100205): process 20100205
>>
>> /nas/headnode1/jwhitaker/ensdata/2010020500/apcp.refcst_ens.grid.
>> 020500.2010.nc
>> /nas/headnode1/jwhitaker/ensdata/2010020500/apcp.refcst_ens.grid.
>> 020500.2010.nc
>>
>> /nas/headnode1/jwhitaker/ensdata/2010020500/apcp.refcst_ens.grid.
>> 020500.2010.nc
>> - Updated
>>
>> /nas/headnode1/jwhitaker/ensdata/2010020500/hgt.refcst_ens.spec.
>> 020500.2010.nc
>> /nas/headnode1/jwhitaker/ensdata/2010020500/hgt.refcst_ens.spec.
>> 020500.2010.nc
>>
>> /nas/headnode1/jwhitaker/ensdata/2010020500/hgt.refcst_ens.spec.
>> 020500.2010.nc
>> - Updated
>>
>> /nas/headnode1/jwhitaker/ensdata/2010020500/prmsl.refcst_ens.grid.
>> 020500.2010.nc
>> /nas/headnode1/jwhitaker/ensdata/2010020500/prmsl.refcst_ens.grid.
>> 020500.2010.nc
>>
>> /nas/headnode1/jwhitaker/ensdata/2010020500/prmsl.refcst_ens.grid.
>> 020500.2010.nc
>> - Updated
>>
>> /nas/headnode1/jwhitaker/ensdata/2010020500/temp.refcst_ens.spec.
>> 020500.2010.nc
>> /nas/headnode1/jwhitaker/ensdata/2010020500/temp.refcst_ens.spec.
>> 020500.2010.nc
>>
>> /nas/headnode1/jwhitaker/ensdata/2010020500/temp.refcst_ens.spec.
>> 020500.2010.nc
>> - Updated
>>
>> get_jsw_fcsts: generating nc files
>> /mac_home/map
>>
>> fatal:FileWriteVar: Type mismatch, can't perform assignment
>>
>> Traceback (most recent call last):
>> File "/home/map/netcdf/ens_jsw/linux/create_refcst_netcdf.py", line
>> 151, in <module>
>> levidsout[npert,nchar] = pert[nchar]
>> File
>> "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/
>> python2.5/site-packages/PyNIO/Nio.py",
>> line 364, in __setitem__
>> self._obj[xsel] = value
>> SystemError: error return without exception set
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> pyngl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
>
>
> --
> 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

_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Wed Feb 10 15:01:31 2010

This archive was generated by hypermail 2.1.8 : Thu Feb 18 2010 - 07:48:02 MST