UTF 8 errors - Could not load data Less Connection reset: 'utf-8' codec can't decode byte 0xe2 in position 3: unexpected end of data

If you are using 4.3 or above, you will see errors like the following if you access data that is not stored in non-ascii or utf-8

Error
App 188828. p3.1_1540136528: Could not load data Less
Connection reset: 'utf-8' codec can't decode byte 0xe2 in position 3: 
unexpected end of data

One option is to clean up the underlying raw data as part of your ETL ingestion process.

If that is not feasible, an alternative workaround is to identify the corrupt column(s) in your table and perform the following steps:

  1. apply base64encode() function to it. This will allow the browser to display the data in in the UI.
  2. Use custom JS in the “display format” to convert the base64 to proper ascii.

STEP 1

Apply function base64encode() to your column in the visual shelves:

STEP 2

Apply custom display format to the field property

function myFunc(value) {
    // Your custom JS code goes here
    // Make sure to return an updated version of value
    return atob(value);
  }
1 Like

Hi Shaun, I have two questions about similar error message:
Visual 16561 - Could not load data
Connection reset: ‘utf-8’ codec can’t decode byte 0xc3 in position 28: unexpected end of data

a.) I can’t find the UTF-8 error in my hive table. If I query the data in Hive by looking for e.g.e “À”, I do not find special characters. How can I identify any “wrong” characters in the underlying raw table (8 Million rows)?

b.) I did not find base64encode() function. If I try to apply custom JS
function myFunc(value) {
var x = btoa(value)
return atob(x);
}
I get the following error message:
Failed to update dataset. Custom JS styles can only be set if site-wide custom styles are enabled.

@trit You can enable custom style using : http://documentation.arcadiadata.com/latest/#pages/topics/custom-style-on.html

Navigate to it through Site Settings: http://documentation.arcadiadata.com/latest/#pages/topics/site-settings.html

1 Like