potiuk commented on issue #56295:
URL: https://github.com/apache/airflow/issues/56295#issuecomment-3364659808

   This is correct behaviour. The docstring of Python Virtualenv operator 
explains that serialization is used to execute virtualenv operator method and:
   
   a) all arguments are serializable
   b) there is "expect_airflow" parameter which you should set (and have the 
same version of airflow installed in the venv)  if you need to access any 
"airflow" functionality - for example import airflow classes or execute any 
airflow util commands
   
   There are various error conditions triggered in this case:
   
   - in some cases where argument cannot be serialized and you pass outlet as 
kwarg (you do)  the class passed there cannot be serialized by default 
serialization (you can use dill, maybe it will be able to serialize it if you 
really want or you should remove the unserializable parameter from the kwargs 
passed)
   - in other cases where your target venv does not contain airflow 
(system_site_packages = False and you did not install airflow in the venve) - 
it will not be able to deserialize parameters when "airflow" module is used. 
   
   So yes - with different combinations of parameters and installed packages, 
it's quite expected that you get different errors.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to