UnicodeDecodeError: 'ascii' codec cannot decode byte in position
You may see an error such as the following while downloading Impala query results in
CSV format from Hue: "
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in
position 49: ordinal not in range(128)". This occurs when the query results
contain special characters of non-ASCII encoding.
- SSH into the Hue server host.
Change directory to the following:
Back up the
cp -R hue hue_orginal
Change to the
Install the Wheel package using pip.
./build/env/bin/pip install wheelThe Wheel package is used to avoid recompiling your software during every install.
Install the Python Setuptools package for Hue:
./build/env/bin/pip install setuptools==44.1.0
Install Tablib version 0.12.1:
./build/env/bin/pip install tablib==0.12.1
Update the permissions of the Tablib library and other packages that were
installed during the process by using the following command:
chmod 0755 [***TABLIB-LIBRARY-NAME***]
- Go to Cloudera Manager and restart the Hue service.