-
Notifications
You must be signed in to change notification settings - Fork 14.2k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe5 in position 4 #2600
Comments
Could you please replicate using utf8mb4 as character set instead of utf8? |
@xrmx ok, i'll try, tks. But still amazing |
|
@timfeirg does |
@timfeirg sorry, typo :) i meant |
I'm sorry, I just tried both If I switch back to python2.7, the example charts would work fine, with or without adding the extra this comment was a mistake, @xrmx |
I'm hitting this too when upgrading a sqlite installation from caravel to superset, both python3.4. |
@zhangjiajie023 @timfeirg Here this was caused by having in the config a SECRET_KEY different than the one used to encrypt the password. |
I've been down for some time. I checked the security key and am using same one as with 2.7. My complete traceback below. Any help would be appreciated! |
We don't recommend using sqlite in production. Also we don't build against python 3.6 (yet). Might be safer/easier to run py3.4 on against mysql |
@mistercrunch it's not an unicode issue, it is trying to decode encrypted data with the wrong key. I've opened a PR raising an intelligible error upstream but i forgot to update it. |
@jerryhall I don't think sqlite takes a charset option |
@xrmx any solutions on this? If not, can you tell me how to run this in python 2.7. I believe I'm running into the same error.... Stack trace as follows: |
@bmackattack if you are using the wrong key the only solution is to use the right one, you are the only one who knows it. My patch just makes the error explicit. |
Now sqlalchemy-utils will make explicit that we are trying decoding the secret with the wrong key instead of a generic UnicodeDecodeError. Fix apache#2600
Now sqlalchemy-utils will make explicit that we are trying decoding the secret with the wrong key instead of a generic UnicodeDecodeError. Fix #2600
Here is how I was able to fix this: #8538 (comment) |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Make sure these boxes are checked before submitting your issue - thank you!
Superset version
0.15.4
Expected results
change the metadata db from db2 to previous db1 can work
Actual results
after changing to db1, exists the encoding error
Steps to reproduce
?charset=utf8
insqlalchemy_database_uri
, andcreate database db1 character set utf8
,use db1 as the metadata db, works
?charset=utf8
insqlalchemy_database_uri
, andcreate database db2 character set utf8
,use db2 as the metadata db, works
change the
sqlalchemy_database_uri
from db2 to db1python3.5 superset 0.15.4 mysql 5.7
The text was updated successfully, but these errors were encountered: