El dj 23 de 03 del 2006 a les 16:08 -0800, en/na Dav Clark va escriure:
> On Thursday 23 March 2006 04:31, you wrote:
> 
> > That's strange. It seems like the action log got corrupted. The action
> > log is implemented as a table living in: /_p_transactions/actionlog;
> > can you read it with Matlab?
> 
> I can indeed read this dataset in matlab.  The opcodes seem to be 
> straightforward integers, while 'arg1' and 'arg2' appear to be 
> non-human-readable strings (i.e. containing non-ascii values).

I think this is the problem. The string columns should represent the
paths of the nodes, and if they contain bad information, then PyTables
can't correctly interpret what's there. matlab has no problems with this
because it doesn't have to *interpret* the action log contents.

> 
> I am going to see if I can figure it out myself, but is there a simple way to 
> disable the undo feature when reading?  As you can see from the error log 
> I've sent, that's where the error is ocurring.  It seems strange that one 
> would enable undo on the File object even when the file is open read only...

The undo feature is always activated whenever an action log is found in
the file. But, as you said, this has non-sense for files opened in
read-only mode, so I prevented the undo activation for this case (done
in SVN). Here is the patch:

===================================================================
--- tables/File.py      (revision 1508)
+++ tables/File.py      (working copy)
@@ -601,8 +601,9 @@
             root._v_attrs._g__setattr(
                 'PYTABLES_FORMAT_VERSION', format_version)

-        # If the file is old, check if it has a transaction log
-        if not new and _transGroupPath in self:
+        # If the file is old, and not opened in "read-only" mode,
+        # check if it has a transaction log
+        if not new and self.mode != "r" and _transGroupPath in self:
             # It does. Enable the undo.
             self.enableUndo()
=====================================================================

BTW, I'm about to release PyTables 1.3. If you can send me the sample
HDF5 file with the coumpound dataset that cannot be read in PyTables I
can have a look at it and try to fix the issue before the release.

Cheers,

-- 
>0,0<   Francesc Altet     http://www.carabos.com/
V   V   Cárabos Coop. V.   Enjoy Data
 "-"




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to