Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cloudsight.errors.APIError: invalid byte sequence in UTF-8 #1

Open
ggstamm opened this issue Jun 9, 2017 · 3 comments
Open

cloudsight.errors.APIError: invalid byte sequence in UTF-8 #1

ggstamm opened this issue Jun 9, 2017 · 3 comments

Comments

@ggstamm
Copy link

ggstamm commented Jun 9, 2017

Hello,

I'm having an error with your API:

File "C:\Python27\lib\site-packages\cloudsight\api.py", line 114, in image_request
return self._unwrap_error(response)
File "C:\Python27\lib\site-packages\cloudsight\api.py", line 88, in _unwrap_error
raise errors.APIError(json_response['error'])
cloudsight.errors.APIError: invalid byte sequence in UTF-8

I'm using it in a Windows 10, and the image is the following
https://dafitistatic-a.akamaihd.net/p/Colcci-Camiseta-Colcci-Bordado-Amarela-7538-2489802-1-zoom.jpg

@ggstamm
Copy link
Author

ggstamm commented Jun 9, 2017

I don't use the link, I send it locally.

@ggstamm
Copy link
Author

ggstamm commented Jun 14, 2017

Found a solution;
In the cloudsight\api.py, the line 113, change this;
data=data, files={'image_request[image]': (filename, image)})

to this;
data=data, files={'image_request[image]': image})

problem solved here!

@cweilemann
Copy link

@ggstamm I know it's exactly one year later, but would you like to submit a PR for this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants