You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Neon-Face (via GitHub)" <gi...@apache.org> on 2025/08/07 19:16:24 UTC
Re: [I] [Bug] `standard.operators.python` fails the task randomly [airflow]
Neon-Face commented on issue #54223:
URL: https://github.com/apache/airflow/issues/54223#issuecomment-3165429634
> It seems like the bug is from `airflow.providers.standard.operators.python`, it possibly triggers server error and change the task state.
>
> ```
> 2025-08-07 18:06:42 [warning ] Server error [airflow.sdk.api.client] detail={'detail': {'reason': 'not_found', 'message': "V
> ariable with key 'PythonVirtualenvOperator.cache_key' not found"}}
> 2025-08-07 18:06:42 [error ] Variable not found [airflow.sdk.api.client] detail={'detail': {'reason': 'not_found', 'message': "V
> ariable with key 'PythonVirtualenvOperator.cache_key' not found"}} key=PythonVirtualenvOperator.cache_key status_code=404
> ```
>
> It is located in `.venv/lib/python3.9/site-packages/airflow/providers/standard/operators/python.py`: `"cache_key": str(Variable.get("PythonVirtualenvOperator.cache_key", "")),`
>
> Also in `.venv/lib/python3.9/site-packages/airflow/providers/standard/operators/python.py` , Variable is imported in an old way: `from airflow.models.variable import Variable` instead of `from airflow.sdk import Variable`.
>
> Can anyone help me confirm that such issue does exist? Thanksss!
I think this is another issue now.... not only `@task.virtualenv` will fail randomly, `@task` as well....
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org