[
https://issues.apache.org/jira/browse/AIRFLOW-2666?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Emmanuel Brard updated AIRFLOW-2666:
------------------------------------
Component/s: cli
> Cannot import exported variables
> --------------------------------
>
> Key: AIRFLOW-2666
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2666
> Project: Apache Airflow
> Issue Type: Bug
> Components: cli
> Affects Versions: Airflow 1.9.0
> Reporter: Emmanuel Brard
> Priority: Major
>
> 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)