question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Import ascii characters not valid.

See original GitHub issue

Hello,

I try to upload a csv file with the name of a user (Ævar). but I get this error.

UnicodeEncodeError encountred while trying to read file: 'ascii' codec can't encode character u'\xc6' in position 241: ordinal not in range(128)

I have debugged a part of the code to find out where it goes wrong. Everything goes well except extracting the data from tablib.

If I create a print statement at ‘formats/base_formats.py’ at line 108 (before return data) It will crash.

Python interpreter = 2.7 Django = 1.9 tablib version = 0.10.0 also tried the dev version. django-import-export = 0.4.2

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
creimerscommented, Mar 13, 2018

@int-ua I’m facing the production server phenomenon (Elastic Beanstalk, AWS). In development, everything’s just fine… Any ideas?

2reactions
int-uacommented, Feb 5, 2016

Are you having it in a development environment? I have it on the production server, but can’t reproduce it on my machine even with the seemingly identical configuration.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to read non ascii characters from csv file
The error message strongly indicates that the file isn't a valid UTF-8 file. Now we've got no idea how you obtained the file...
Read more >
Non-ASCII characters in txt file can't be import correctly by ...
I have a text file in which there are some Chinese characters and I would Import the file into Mathematica as a string...
Read more >
Checking for Invalid Characters When Importing Maximo Data
From the Excel menu select MAXQuickLoad > Tools > ASCII Check. After processing is finished, rows that have invalid characters are marked with...
Read more >
Error When Importing Items with Special Characters
When attempting to import a file into a batch, with a record that contains a special character, the following error occurs. -- Error...
Read more >
Which file encoding should I use for importing CSV...
"The CSV file you uploaded contains non-ASCII characters. Make sure to set the right encoding." Both Test/PROD instances default language is ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found