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

Can't upload image with unicode chars in name #1150

Closed
tkald opened this issue May 9, 2017 · 1 comment
Closed

Can't upload image with unicode chars in name #1150

tkald opened this issue May 9, 2017 · 1 comment
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@tkald
Copy link

tkald commented May 9, 2017

Issue type: bug

Python version: 2.7
NetBox version: 2.0

Trying to upload device image with name "jõulukuusk.jpg" and gettin an error:

<type 'exceptions.UnicodeEncodeError'>
'ascii' codec can't encode character u'\xf5' in position 1: ordinal not in range(128)

No issues with images containing plain ascii chararacters...

@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label May 9, 2017
@jeremystretch
Copy link
Member

This is due to image_upload() returning the file path as a string rather than Unicode under Python 2. (Python 3 is unaffected.)

lampwins pushed a commit to lampwins/netbox that referenced this issue Oct 13, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 18, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
Development

No branches or pull requests

2 participants