On Wed, 2006-10-04 at 21:15 +0200, Yann Rouillard wrote:
> I am still willing to solve this problem, could you give me some clue
> about it ?
Sorry Yann, got busy and forgot about you. :) Thanks for the reminder.
The problem is that the one or both of the attrs_pickle or idx_pickle
columns in the types table is, I believe, being stored as NULL in the
database. This should never happen. In _load_object_types, you might
try printing the output of attrs and idx, just to be sure.
This table is written to in register_object_type_attrs() in one of two
places: either when the object type is being updated or when the object
type is being created. In the former (updated) case:
if not table_needs_rebuild:
# Only simple (i.e. pickled only) attributes are being added,
# or only new indexes are added, so we don't need to rebuild the
# table.
if len(new_attrs):
self._db_query("UPDATE types SET attrs_pickle=? WHERE id=?",
(buffer(cPickle.dumps(attrs, 2)), cur_type_id))
if len(new_indexes):
self._register_create_multi_indexes(new_indexes, table_name)
self._db_query("UPDATE types SET idx_pickle=? WHERE id=?",
(buffer(cPickle.dumps(indexes, 2)), cur_type_id))
And in the latter (created) case:
# Add this type to the types table, including the attributes
# dictionary.
self._db_query("INSERT OR REPLACE INTO types VALUES(?, ?, ?, ?)",
(cur_type_id, type_name, buffer(cPickle.dumps(attrs, 2)),
buffer(cPickle.dumps(indexes, 2))))
You might add some print statements before those calls to _db_query to
ensure that the data it is writing out is what it's actually later
reading. If memory serves, this was the bug. It was clearly writing
out the pickled blob to that table, but next time it read it, it was
None (which means NULL in the db).
Before you try any of that, try updating svn again and see what happens.
In going over this code just now I spotted a bug (one that should have
nothing to do with this situation) and one that _potentially_ might help
this.
Cheers,
Jason.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-devel