pyexiv2-developers team mailing list archive
-
pyexiv2-developers team
-
Mailing list archive
-
Message #00112
Empty XmpTag.type and Value not set error at write() with empty XmpBag
Hi,
I maybe have found some pyexiv2 issues now.
1) XmpTag.type returns '' in a case it should return
some other value, namely 'Region' or 'RegionStruct'.
Detailed information can be found in
* http://dev.exiv2.org/boards/3/topics/1039#message-1065
2) If I try to set the value of a XmpBag to [''] for an empty
bag containing nothing but structs, I get an "ValueError:
Value not set" at write(). I was able to track this to
exiv2wrapper.cpp:XmpTag::setArrayValue
A (quick) fix (for me) was:
// Reset the value
-- _datum->setValue(0);
++ _datum->setValue(std::string(""));
++ // setValue(0) leads to "ValueError: Value not set"
++ // if array=['']
I made this findings when adding MS Photo 1.2 RegionInfo and Metadata
Working Group Regions schema to exiv2 for using with pyexiv2. For more
information about the potential bugs see
* http://dev.exiv2.org/boards/3/topics/1039#message-1065
* http://dev.exiv2.org/boards/3/topics/1039#message-1064
For testing, the new namespaces need exiv2 revision 2644 plus patch
appended to issue 798 (http://dev.exiv2.org/issues/798).
Regards,
Benjamin
Attachment:
smime.p7s
Description: S/MIME Kryptografische Unterschrift
Follow ups