A Monday 17 November 2008, Darren Dale escrigué: > Hello, > > I have a client application that listens for events during data > acquisition and updates a Table. Recently I started receiving errors > part-way through a scan, once after 100 points, once after about 400: > > > Traceback (most recent call last): > File > "/home/specuser/src/xpaxs/xpaxs/instrumentation/spec/runner.py", line > 115, in update > SpecEventsDispatcher.dispatch() > File "/home/specuser/src/xpaxs/SpecClient/SpecEventsDispatcher.py", > line 336, in dispatch > receiver(args) > File "/home/specuser/src/xpaxs/SpecClient/SpecEventsDispatcher.py", > line 49, in __call__ > return robustApply(slot, arguments) > File "/home/specuser/src/xpaxs/SpecClient/SpecEventsDispatcher.py", > line 36, in robustApply > return slot(*arguments[0:n_args]) > File "/home/specuser/src/xpaxs/SpecClient/SpecScan.py", line 114, > in __newScanData > self.newScanData(scanData) > File "/home/specuser/src/xpaxs/xpaxs/instrumentation/spec/scan.py", > line 103, in newScanData > self._scanData.appendDataPoint(scanData) > File > "/home/specuser/src/xpaxs/xpaxs/frontends/xfs/fileinterface.py", line > 214, in appendDataPoint > row = self.h5Node.data.row > File "/usr/lib/python2.5/site-packages/tables/group.py", line 854, > in __getattr__ > return self._f_getChild(name) > File "/usr/lib/python2.5/site-packages/tables/group.py", line 736, > in _f_getChild > return self._v_file._getNode(childPath) > File "/usr/lib/python2.5/site-packages/tables/file.py", line 914, > in _getNode > "stale weak reference to dead node ``%s``" % parentPath > AssertionError: stale weak reference to dead node ``/scan3/data`` > > > Could anyone please offer a suggestion, why would my "data" table > become a dead node? At each point in the scan, I do something like: > > row = self.h5Node.data.row > > for key, val in data.iteritems(): > row[key] = val > > row.append() > self.h5Node.data.flush() > > where self.h5Node is a reference to the "/scan3" group.
Mmh, this can be due to the way you are accessing the Row object that is interacting badly with the LRUCache for nodes. One possible solution is to bound the *Table* object instead of the Row one. Something like: tbl = self.h5Node.data for key, val in data.iteritems(): tbl.row[key] = val tbl.row.append() tbl.flush() should work. Hope that helps, -- Francesc Alted ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users