Skip to content

Commit

Permalink
Fix invalide use of encode on bytes object
Browse files Browse the repository at this point in the history
Within the pywps.inout.inputs.ComplexInput the json convertion function
use encode where decode should be used. The patch fix this issue.
  • Loading branch information
gschwind committed Mar 21, 2022
1 parent 7f228ff commit b5d9dc3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pywps/inout/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def _json_data(self, data):
else:
# Otherwise we assume all other formats are unsafe and need to be enclosed in a CDATA tag.
if isinstance(self.data, bytes):
out = self.data.encode(self.data_format.encoding or 'utf-8')
out = self.data.decode(self.data_format.encoding or 'utf-8')
else:
out = self.data

Expand Down

0 comments on commit b5d9dc3

Please sign in to comment.