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.

HUE 4.7 "'ascii' codec can't decode byte" error

See original GitHub issue

Is the issue already present in https://github.com/cloudera/hue/issues or discussed in the forum https://discourse.gethue.com? No, at least I couldn’t find it

Describe the bug: When running Hive or Impala query that contains special characters, for example çã the error is returned: 'ascii' codec can't decode byte 0xc3 in position 90: ordinal not in range(128)

Log file with more details attached. hue_47_ascii_codec_cant_decode_error.txt The same query works without errors when executed from Hue 4.6

Steps to reproduce it? Create table with data that contains symbols ç or ã in string fields and try to query it like this: select * from db.table where name='Don Pelição' The query works fine if it doesn’t contain special characters.

Hue version or source? (e.g. open source 4.5, CDH 5.16, CDP 1.0…). System info (e.g. OS, Browser…). Open source 4.7. System info - OS: Windows 10; Browsers: Firefox and Chrome.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
milletniscommented, Mar 18, 2021

we are facing the same problem. With HUE 4.8.0 some LDAP users are not able to login anymore. Same users and same LDAP backend but Hue 4.4.0 works fine for us.

[18/Mar/2021 21:06:02 +0000] decorators   INFO     AXES: Calling decorated function: dt_login
[18/Mar/2021 21:06:02 +0000] backend      INFO     Augmenting users with class: <class 'desktop.auth.backend.DefaultUserAugmentor'>
[18/Mar/2021 21:06:03 +0000] forms        ERROR    LDAP auth error: 'ascii' codec can't decode byte 0xc3 in position 18: ordinal not in range(128)
[18/Mar/2021 21:06:03 +0000] access       WARNING  127.0.0.1 -anon- - "POST /hue/accounts/login HTTP/1.1" --- Failed login for user: dummy
[18/Mar/2021 21:06:03 +0000] access       WARNING  127.0.0.1 -anon- - "POST /hue/accounts/login HTTP/1.1" --- Failed login for user: dummy
[18/Mar/2021 21:06:03 +0000] decorators   INFO     AXES: New login failure by 127.0.0.1. Creating access record.
1reaction
romainrcommented, May 19, 2020

Indeed, this is has not been working for a while. There are a few tricky unicode places to handle correctly. I faced a few of those while porting to Python 3 (in the fetch result call) and will see if possible to fix at some point.

Read more comments on GitHub >

github_iconTop Results From Across the Web

'ascii' codec cannot decode byte in position | CDP Private Cloud
The Tablib library and other packages should have the drwxr-sr-x permission. Failing to have this permission can result into an tablib module not...
Read more >
Developers - HUE 4.7 "'ascii' codec can't decode byte" error -
HUE 4.7 "'ascii' codec can't decode byte" error. ... Is the issue already present in https://github.com/cloudera/hue/issues or discussed in the forum ...
Read more >
[HUE-9273] [notebook] Encoding Error when use non-ascii ...
It wont execute well , the error will popup : 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128).
Read more >
4.10.0 :: Hue SQL Assistant Documentation - Hue Guide
Hue is an open source SQL Cloud Assistant for querying Databases & Data ... fails with UnicodeDecodeError: 'ascii' codec can't decode byte ......
Read more >
How to fix: "UnicodeDecodeError: 'ascii' codec can't decode ...
The correct way to banish encoding errors in Py2 is to unambiguously decode and encode (byte) strings to Unicode, when conversions are necessary...
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