You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After loading in a properties file, if I use __setitem__ to set a value to a non-string (e.g. prop['http.port'] = 7180), I get an attribute error upon trying to serialize my Properties instance with str(). That is,
str(props)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.5/site-packages/jproperties.py", line 58, in __str__
ret.append(self.escape_key(node.key) + node.separator + self.escape(node.value))
File "/usr/lib/python3.5/site-packages/jproperties.py", line 81, in escape
return value.encode("unicode_escape").decode("utf-8")
AttributeError: 'int' object has no attribute 'encode'
Perhaps a forced cast should be introduced somewhere in the escape chain?
The text was updated successfully, but these errors were encountered:
After loading in a properties file, if I use
__setitem__
to set a value to a non-string (e.g.prop['http.port'] = 7180
), I get an attribute error upon trying to serialize myProperties
instance withstr()
. That is,Perhaps a forced cast should be introduced somewhere in the escape chain?
The text was updated successfully, but these errors were encountered: