From: David S. <da...@dr...> - 2004-04-02 19:43:55
|
I am using PyTables 0.8 and am setting a dictionary as an attribute on a table. When the table is created, I add a dictionary as an attribute of the table like so: site.attrs.totalTime = {entry.day: 0} Later I modify the value like so: Site.attrs.totalTime[entry.day] += timespan After I have done all my processing, I flush the hdf5 file and then close it. When I open it up and get the table, the site.attrs.totalTime variable exists, the key I added also exists, but the value is set to 0, instead of the last value it contained before the last closing. While modifying the value of the totalTime dictionary I am printing the new value to the screen for debugging purposes and I am seeing that the value is being modified. It is odd that it is keeping the table attribute and the key that is created, but the value of that key in the dictionary is being lost. I have installed and use pytables 0.7.2 with my same code and have seen the same issue. Is there something I am doing wrong? Thanks, David |