'ascii' codec can't encode character u'\x82' in position 42: ordinal not in range(128)

Solved!
UserBird
Dataiker
'ascii' codec can't encode character u'\x82' in position 42: ordinal not in range(128)
HTTP code: 500, type: UnicodeEncodeError

I get this error when launching a prediction model.
1 Solution
jrouquie
Dataiker Alumni
This is probably due to a column name containing an accent (like โ€œรฉโ€). Try renaming the column.

View solution in original post

0 Kudos
6 Replies
jrouquie
Dataiker Alumni
This is probably due to a column name containing an accent (like โ€œรฉโ€). Try renaming the column.
0 Kudos
Herve
Level 4

I get a similar error right after loading the new "AI Consumer Quick Start" tutrial (from the dataiku academy) and loading "Model Report & Predictions" dashboard. 

I don't see any panda usages in the flow nor is there any accent usage in the column names. 

0 Kudos
NancyK
Community Manager
Community Manager

Hi @Herve, which version of Dataiku DSS are you using?

0 Kudos
Herve
Level 4

9.0.1 on ubuntu 20.04.2

0 Kudos
NancyK
Community Manager
Community Manager

Hi @Herve , could you please share a screenshot? I'm unable to reproduce the error. If you prefer, you can also report it and share any information or screenshots/screencasts that could be helpful in our feedback/bug tracker.

Thanks in advance!

0 Kudos
stevejonn
Level 1

To use a specific encoding (e.g. 'utf-8') use the encoding argument for pandas to csv:

df.to_csv(file_name, sep='\t', encoding='utf-8')

 

0 Kudos