|
From: Benjamin R. <ben...@ou...> - 2012-09-26 14:33:36
|
On Wed, Sep 26, 2012 at 10:27 AM, Michael Rawlins <raw...@ya...>wrote: > Recently built and installed netCDF4-1.0. I'm running a script that has > worked on two other linux OS systems. Error: > > File "test.py", line 96, in <module> > data.missing_value=-9.99 > File "netCDF4.pyx", line 2570, in netCDF4.Variable.__setattr__ > (netCDF4.c:28242) > File "netCDF4.pyx", line 2392, in netCDF4.Variable.setncattr > (netCDF4.c:26309) > File "netCDF4.pyx", line 1013, in netCDF4._set_att (netCDF4.c:12699) > AttributeError: NetCDF: Write to read only > > > The statement in the code triggers the error is: > > data.missing_value=-9.99 . > > MR > > > This typically happens when one opens a netCDF4 Dataset object in 'r' mode, and/or if the file permissions for the file was set to read-only. When modifying an attribute, it is technically trying to write to the file. Ben Root |