You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/10/31 15:38:22 UTC

[GitHub] [superset] yanickrochon commented on issue #8538: Change SECRET_KEY and get error `ValueError: Invalid decryption key` on K8s

yanickrochon commented on issue #8538:
URL: https://github.com/apache/superset/issues/8538#issuecomment-1297277374

   > @andtlopez thanks for the hint.
   > 
   > ```
   > ...
   > for db_id in db_ids:
   >     db = session.query(Database).get(db_id)
   >     if db.password is not None:
   >         print(db.id, db.database_name, db.password)
   >  ...
   > ```
   > 
   
   And I get 
   
   ```
   Traceback (most recent call last):
     File "/path/to/lib/python3.8/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 128, in decrypt
       decrypted = decrypted.decode('utf-8')
   UnicodeDecodeError: 'utf-8' codec can't decode byte 0x96 in position 1: invalid start byte
   
   During handling of the above exception, another exception occurred:
   
   Traceback (most recent call last):
     File "<console>", line 2, in <module>
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 1018, in get
       return self._get_impl(ident, loading.load_on_pk_identity)
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 1135, in _get_impl
       return db_load_fn(self, primary_key_identity)
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 286, in load_on_pk_identity
       return q.one()
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3490, in one
       ret = self.one_or_none()
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/orm/query.py", line 3459, in one_or_none
       ret = list(self)
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 100, in instances
       cursor.close()
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
       compat.raise_(
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/util/compat.py", line 182, in raise_
       raise exception
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 80, in instances
       rows = [proc(row) for row in fetch]
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 80, in <listcomp>
       rows = [proc(row) for row in fetch]
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 579, in _instance
       _populate_full(
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/orm/loading.py", line 725, in _populate_full
       dict_[key] = getter(row)
     File "/path/to/lib/python3.8/site-packages/sqlalchemy/sql/type_api.py", line 1278, in process
       return process_value(impl_processor(value), dialect)
     File "/path/to/lib/python3.8/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 477, in process_result_value
       value = super().process_result_value(value=value, dialect=dialect)
     File "/path/to/lib/python3.8/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 422, in process_result_value
       decrypted_value = self.engine.decrypt(value)
     File "/path/to/lib/python3.8/site-packages/sqlalchemy_utils/types/encrypted/encrypted_type.py", line 130, in decrypt
       raise ValueError('Invalid decryption key')
   ValueError: Invalid decryption key
   ```
   
   Nope, this does not help.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org