hierarchicalSubject (python 3.4.3)
Submitted by Victor
Files that haven't been opened in lightroom give the error 'No namespace'. This is a bit strange since Exiv2 0.25 namspaces are automatically registered when you try to add values.
Example: picture['Xmp.lr.hierarchicalSubject'] = 'name' Result: 'WARNING **: No namespace info available for XMP prefix `lr''
I tried to solve this by using: picture.register_xmp_namespace('http://ns.adobe.com/lightroom/1.0/', 'lr')
But the problem is that it's only possible to add/change 'one value'. So let's say we add 'name' and then 'name2', this wont work. It will only replace 'name' with 'name2'. So I'm asuming that the value type is set to "Text" instead of "bag Text" by default.
I've been trying to solve this with: picture.set_xmp_tag_struct() Result: 'AttributeError: 'Metadata' object has no attribute 'set_xmp_tag_struct'
This feels a bit strange, I'm honestly unsure how to use 'set_xmp_tag_struct()' correctly but I can't figure it out since it doesn't seem to work at all.
How I've been trying to use it: picture.set_xmp_tag_struct('Xmp.lr.hierarchicalSubject', BAG=21) picture.set_xmp_tag_struct('Xmp.lr.hierarchicalSubject', BAG)
Feels like a bug, let me know, thanks.