Re: PyNIO: "attributes" dict not updated after adding new attributes

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Sep 22 2010 - 12:36:24 MDT

Hi Michael,

I was able to duplicate this problem and indeed it is a bug. Thanks
for pointing it out. We will try to fix it as soon as possible.
  -dave

On Sep 22, 2010, at 4:23 AM, Michael Decker wrote:

> Hi everyone,
>
> I just stumbled upon the following problem after switching from
> __dict__ to attributes for access to NetCDF attributes with PyNIO.
>
> It seems that the "attributes" dict is not updated after writing new
> (global) attributes to a NetCDF file when accessing it through the
> "attributes" attribute. "__dict__" on the other hand is updated
> instantly. To get the new attributes into the "attributes" dict, I
> have to close and reopen the file.
>
> I have only tested this for global attributes so far, so I don't
> know if it works on variable attributes or not.
>
> Attached is a small script that shows the problem on my system
> (64bit Debian/GNU Linux stable with PyNIO 1.4.0)
>
> So as a workaround I just close and reopen the files if I want to
> read the new attributes from them for now.
> Is this a known bug or in any way intended to behave like that? It
> seems a little inconsistent to me.
>
> Cheers,
> Michael
>
> --
> Michael Decker
> Forschungszentrum Jülich
> ICG-2: Troposphäre
>
> E-Mail: m.decker@fz-juelich.de
> <nio_attributes.py>_______________________________________________
> 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 Sep 22 12:36:27 2010

This archive was generated by hypermail 2.1.8 : Mon Oct 04 2010 - 09:57:00 MDT