riana-r opened a new issue, #38742: URL: https://github.com/apache/beam/issues/38742
### What happened? Hello, I am trying to read 50 csv files with 3 columns from a Cloud Dataflow / Apache Beam v2.67.0 job. Previously, I was using ReadFromText, then I wrote a lambda function to split each text line into 3 fields. I tried switching to beam.io.textio.ReadFromCsv (to handle quoted fields for example), but the job randomly fails with the following error : <img width="1516" height="572" alt="Image" src="https://github.com/user-attachments/assets/47f2aa0b-c871-4427-b038-0a064d17af0c" /> What I understand is : ReadFromCsv is reading the data using the Pandas API, which results in 1 or multiple pandas Dataframes. Then it tries to convert each Dataframe into a Beam PCollection. In my case, it seems like an empty Dataframe can be generated sometimes, but the conversion process does not handle it well. This code here : https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/worker/opcounters.py#L221 ``` mean_element_size = self.producer_batch_converter.estimate_byte_size( windowed_batch.values) / batch_length ``` Seems to be the issue, as the batch_length is 0, ### Issue Priority Priority: 2 (default / most bugs should be filed as P2) ### Issue Components - [x] Component: Python SDK - [ ] Component: Java SDK - [ ] Component: Go SDK - [ ] Component: Typescript SDK - [x] Component: IO connector - [ ] Component: Beam YAML - [ ] Component: Beam examples - [ ] Component: Beam playground - [ ] Component: Beam katas - [ ] Component: Website - [ ] Component: Infrastructure - [ ] Component: Spark Runner - [ ] Component: Flink Runner - [ ] Component: Prism Runner - [ ] Component: Twister2 Runner - [ ] Component: Hazelcast Jet Runner - [x] Component: Google Cloud Dataflow Runner -- 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]
