undefined local variable "type" in XmpTag._compute_value()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyexiv2 |
Invalid
|
Low
|
Unassigned |
Bug Description
Looks like a local variable, `type`, needs to be defined at the start of XmpTag.
Lines 185-204 of src/pyexiv2/xmp.py:
def _compute_
# Lazy computation of the value from the raw value
if self.type.
type = self.type[4:]
if type.lower(
elif self.type == 'Lang Alt':
for k, v in self._raw_
What version of the code are you running?
The trunk branch doesn’t have this, it already refers to self.type, and this line of code was never changed since it was first introduced, according to the branch’s history.
See http:// bazaar. launchpad. net/~osomon/ pyexiv2/ pyexiv2- 0.3/view/ head:/src/ pyexiv2/ xmp.py# L185.
I’m guessing you’re running a modified version of the code that has this bug.