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

Import/Export on python 3 fails #851

Closed
flycam opened this issue Jan 29, 2017 · 1 comment
Closed

Import/Export on python 3 fails #851

flycam opened this issue Jan 29, 2017 · 1 comment
Labels
type: bug A confirmed report of unexpected behavior in the application

Comments

@flycam
Copy link

flycam commented Jan 29, 2017

On python 3.5 imports and exports are failing with an exception.

Trying to export anything (connections, prefixes, devices etc) returns:

<class 'NameError'>

name 'unicode' is not defined

On Import any input triggers this error:

<class '_csv.Error'>

iterator should return strings, not bytes (did you open the file in text mode?)

running the same netbox installation on 2.7 works just fine.
Repo cloned on 2017-01-28

@hnk
Copy link

hnk commented Jan 31, 2017

We run into the same issue during import in a python3 install of version 1.8.3.

Django debug says the exact spot of the error is here:
https://github.com/digitalocean/netbox/blob/develop/netbox/utilities/forms.py#L247

What's interesting is that from reading up on the error people suggest to run through a utf-8 decode before reading the data and here it is encoded right before...

Exporting fails at a different code path, but I do not have that debug in front of me right now...

@jeremystretch jeremystretch added the type: bug A confirmed report of unexpected behavior in the application label Feb 1, 2017
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 19, 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

3 participants