You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Emmanuel Brard (JIRA)" <ji...@apache.org> on 2018/06/23 11:05:00 UTC

[jira] [Created] (AIRFLOW-2666) Cannot import exported variables

Emmanuel Brard created AIRFLOW-2666:
---------------------------------------

             Summary: Cannot import exported variables
                 Key: AIRFLOW-2666
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2666
             Project: Apache Airflow
          Issue Type: Bug
    Affects Versions: Airflow 1.9.0
            Reporter: Emmanuel Brard


When exporting variables, it looks like the export helper serialize to JSON with JSON type, so an float is a float in the resulting file.
 
But then when importing from this file, there is no type convertion and this step in the set_val method (class Variable) fails:
 
self._val = fernet.encrypt(bytes(value, 'utf-8')).decode() 
 
With "encoding without a string argument"
 
A simple fix would be to: 
 
self._val = fernet.encrypt(bytes(str(value), 'utf-8')).decode()



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)