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
However if tag a has parameter, its value must be a string, which is unexpected due to previous example.
data= {"a": {"@param": "test", "#text": 1}}
Throws an exception TypeError: decoding to str: need a bytes-like object, int found.
Param is integer, value is string
This works fine as well as simple case when only value of tag is provided:
data= {"a": {"@param": 1, "#text": "test"}}
<aparam="1">test</a>
The text was updated successfully, but these errors were encountered:
Behoston
changed the title
Tag value (#text) must be a string when tag has additional parameters
Tag value (#text) must be a string when tag has additional parameters - unparse
Dec 9, 2024
Simple case - no params
works as expected, producing:
One param
However if tag
a
has parameter, its value must be a string, which is unexpected due to previous example.Throws an exception
TypeError: decoding to str: need a bytes-like object, int found
.Param is integer, value is string
This works fine as well as simple case when only value of tag is provided:
The text was updated successfully, but these errors were encountered: