Re: PyNIO TypeError?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri, 9 Jan 2009 10:56:51 -0700 (MST)

Steve,

Thanks for the file. I was able to open it using Python 2.5 and PyNIO
installed from the file you listed below.

I then built Python 2.6 and numpy 1.2.1 and tried the same PyNIO. I
got the same error. (I think it was the same, but it was an error
nonetheless.)

I then built the latest PyNIO from source code using Python 2.6/numpy
1.2.1 and had the same problem.

I think there's probably an incompatibility issue, and hopefully
Dave will be able to look into this.

FYI for Dave and anybody else who is interested. I googled this error
and found the following:

   From the "what's new in python 2.6" page
   http://docs.python.org/dev/whatsnew/2.6.html

   object.__init__() previously accepted arbitrary arguments and keyword
   arguments, ignoring them. In Python 2.6, this is no longer allowed and
   will result in a TypeError. This will affect __init__() methods that
   end up calling the corresponding method on object (perhaps through
   using super()). See issue 1683368 for discussion.

You can go to the what's new page and click on "issue 1683368"
if you want further information.

--Mary

On Fri, 9 Jan 2009, Mary Haley wrote:

>
> Hi Steve,
>
> I'm wondering if there's an issue with mixing Python 2.5 and 2.6
> here (since PyNIO was built with 2.5.x).
>
> Can you provide me with the NetCDF file? You can email me offline
> about this.
>
> Thanks,
>
> --Mary
>
> On Fri, 9 Jan 2009, Steve Sullivan wrote:
>
>> Hi,
>>
>> I installed the binary PyNIO PyNIO-1.3.0b1.linux-i686-gcc412-2.5.tar.gz
>> but when I try to use it I get ...
>>
>> $ python
>> Python 2.6 (r26:66714, Dec 2 2008, 12:21:28)
>> [GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>>>>> import Nio
>>>>> ncdf = Nio.open_file( 'testa.nc', mode='r')
>> Traceback (most recent call last):
>> File "<stdin>", line 1, in <module>
>> File "/d1/steves/ftp/python/tdi/lib/python2.6/site-packages/PyNIO/Nio.py",
>> line 514, in open_file
>> file_proxy = _proxy(file, 'str', create_variable=_create_variable)
>> File "/d1/steves/ftp/python/tdi/lib/python2.6/site-packages/PyNIO/Nio.py",
>> line 227, in _proxy
>> instance = cls(obj)
>> File "/d1/steves/ftp/python/tdi/lib/python2.6/site-packages/PyNIO/Nio.py",
>> line 168, in __init__
>> super(_Proxy, self).__init__(obj)
>> TypeError: object.__init__() takes no parameters
>>>>>
>>
>> Do you know how I can fix this?
>>
>> Thanks,
>>
>> Steve
>>
>> --
>> Steve Sullivan steves_at_ucar.edu 303-497-2823
>>
>> FL/2, Research Applications Laboratory
>> National Center for Atmospheric Research
>> PO Box 3000
>> Boulder CO 80307
>> USA
>>
>> _______________________________________________
>> 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
>
_______________________________________________
pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/pyngl-talk
Received on Fri Jan 09 2009 - 10:56:51 MST

This archive was generated by hypermail 2.2.0 : Fri Jan 09 2009 - 11:01:37 MST