Closed rosstitmarsh closed 6 months ago
If the array has any any 0 length strings at the start or the end, the strip function on line 129 in convert_from_packed_string_array removes them.
e.g.
a = ["", "foo", "", "", "bar", "", ""] convert_from_packed_string_array(convert_to_packed_string_array(a)) # returns ["foo", "", "", "bar"]
Replacing strip with removesuffix would work in python >=3.9 or removing the strip and putting the [:-1] back on the end.
strip
removesuffix
[:-1]
Hi @rosstitmarsh, recently I did a PR that can solve that issue ( and others ). I'm waiting for the review-> https://github.com/eclipse/tahu/pull/367
Fixed in #367
If the array has any any 0 length strings at the start or the end, the strip function on line 129 in convert_from_packed_string_array removes them.
e.g.
Replacing
strip
withremovesuffix
would work in python >=3.9 or removing thestrip
and putting the[:-1]
back on the end.