Skip to content

Incorrect reise exception message #204

@BuxoyTuxlik

Description

@BuxoyTuxlik

Please correct the formatting of the line when forwarding the body of the error.

if not six.PY3 and isinstance(val, str):
try:
val = val.decode('utf-8')
except UnicodeDecodeError:
raise ValidationError("'%s' was not valid utf-8")

 Traceback (most recent call last):
   File "/usr/local/lib/python2.7/dist-packages/dropbox/base.py", line 2958, in files_upload
     strict_conflict)
   File "/usr/local/lib/python2.7/dist-packages/dropbox/files.py", line 456, in __init__
     self.path = path
   File "/usr/local/lib/python2.7/dist-packages/dropbox/files.py", line 484, in path
     val = self._path_validator.validate(val)
   File "/usr/local/lib/python2.7/dist-packages/dropbox/stone_validators.py", line 308, in validate
     raise ValidationError("'%s' was not valid utf-8")
ValidationError: '%s' was not valid utf-8

How can I understand what went wrong)))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions