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 Apr 8, 2022
1 parent ae3f5b8 commit 42b7508
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 42b7508

Please sign in to comment.