git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

variables export


Hi,

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()

Are you aware of this issue ?

I am not sure what is the behaviour without encryption, I suppose
SQLAlchemy will do the type conversion to persist it as string.

Thanks,
Emmanuel

-- 








GetYourGuide AG

Stampfenbachstrasse 48  

8006 Zürich

Switzerland



 <https://www.facebook.com/GetYourGuide>  
<https://twitter.com/GetYourGuide>  
<https://www.instagram.com/getyourguide/>  
<https://www.linkedin.com/company/getyourguide-ag>  
<http://www.getyourguide.com>









( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-airflow-development/msg03658.html on line 123
Call Stack
#TimeMemoryFunctionLocation
10.0007363632{main}( ).../msg03658.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-airflow-development/msg03658.html on line 123
Call Stack
#TimeMemoryFunctionLocation
10.0007363632{main}( ).../msg03658.html:0