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

UserBird
UserBird Dataiker, Alpha Tester Posts: 535 Dataiker
HTTP code: 500, type: UnicodeEncodeError

I get this error when launching a prediction model.

Best Answer

Answers

  • stevejonn
    stevejonn Registered Posts: 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')

  • Herve
    Herve Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 58 Partner

    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.

  • NancyK
    NancyK Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer Posts: 22 Dataiker

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

  • Herve
    Herve Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Dataiku DSS Adv Designer, Registered Posts: 58 Partner

    9.0.1 on ubuntu 20.04.2

  • NancyK
    NancyK Dataiker, Dataiku DSS Core Designer, Dataiku DSS Adv Designer Posts: 22 Dataiker

    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!

Setup Info
    Tags
      Help me…