Skip to content

Commit

Permalink
Bugfix: Encoding issue error messages
Browse files Browse the repository at this point in the history
In real life tests there were issues with cell values containing
non-ASCII characters. As Python does not know the encoding of Excel
input values, it assumes ASCII (0-128) when converting unicode to
str. It's set explicitly now.
  • Loading branch information
ubmarco committed Aug 25, 2017
1 parent 62d7f9e commit d1bf980
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -667,7 +667,7 @@ def _get_sheet(self, workbook):

def _raise_value_error(self, msg):
self._plugin.log.error(msg)
raise ValueError(msg)
raise ValueError(msg.encode('UTF-8', 'ignore'))

def _transform_coordinates(self, row=None, column=None):
if row is None and column is None:
Expand Down

0 comments on commit d1bf980

Please sign in to comment.