RubenBBlazquez opened a new issue, #39478:
URL: https://github.com/apache/airflow/issues/39478

   ### Apache Airflow version
   
   2.9.1
   
   ### If "Other Airflow 2 version" selected, which one?
   
   _No response_
   
   ### What happened?
   
   in the method **_upload_file_temp** from 
**DataprocSubmitPySparkJobOperator** it calls the function 
**_generate_temp_filename** which do this return: 
`f"{time:%Y%m%d%H%M%S}_{str(uuid.uuid4())[:8]}_{ntpath.basename(filename)}"` 
and the first format is bad, it gives the following error: 
   `TypeError: unsupported format string passed to module.__format__`
   
   
   ### What you think should happen instead?
   
   it should be like this:
    
`f"{datetime.now():%Y%m%d%H%M%S}_{str(uuid.uuid4())[:8]}_{ntpath.basename(filename)}"`
   
   to get the date string 20240508114811
   
   
   ### How to reproduce
   
   you only have to create an instance of **DataprocSubmitPySparkJobOperator** 
and call the method _upload_file_temp to reproduce the error
   
   ### Operating System
   
   Debian GNU/Linux 11 (bullseye)
   
   ### Versions of Apache Airflow Providers
   
   from 10.7.0 to 10.17.0, in all this versions fail
   
   ### Deployment
   
   Official Apache Airflow Helm Chart
   
   ### Deployment details
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


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