lcl : str is not callable
Adding some debug information, the exception come from .local/share/weboob/modules/2.0/lcl/compat/weboob_browser_filters_standard.py
line 86.
The snippet is:
try:
v = Decimal(text)
if self.sign:
v *= self.sign(original_text)
return v
except InvalidOperation as e:
return self.default_or_raise(NumberFormatError(e))
else:
if self.sign is not None:
if callable(self.sign):
v *= self.sign(original_text)
elif self.sign == '+':
return abs(v)
elif self.sign == '-':
return -abs(v)
else:
raise TypeError("'sign' should be a callable or a sign string")
return v
And indeed the 3rd to 5th lines may raise an exception whereas the same code exists in the else
section which properly take into account the case where self.sign
is a string.
Commenting the following code seems to solve the problem:
try:
v = Decimal(text)
# if self.sign:
# v *= self.sign(original_text)
# return v
except InvalidOperation as e:
return self.default_or_raise(NumberFormatError(e))