Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-11256

Dataframe writers send pickled methods to workers

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • 2.25.0
    • 2.26.0
    • sdk-py-core
    • None

    Description

      This can lead to errors when there's a mismatch between the pandas version used at construction time, and the one used in workers at execution time. For example to_csv constructed with 1.1.4, executed with 0.25.3:

        File "apache_beam/runners/common.py", line 1213, in apache_beam.runners.common.DoFnRunner.process
        File "apache_beam/runners/common.py", line 742, in apache_beam.runners.common.PerWindowInvoker.invoke_process
        File "apache_beam/runners/common.py", line 867, in apache_beam.runners.common.PerWindowInvoker._invoke_process_per_window
        File "/usr/local/lib/python3.7/site-packages/apache_beam/io/fileio.py", line 695, in process
          sink.write(record)
        File "/usr/local/google/home/bhulette/working_dir/beam/sdks/python/apache_beam/dataframe/io.py", line 266, in write_record_incremental
          self.empty = self.write_to(value[:0])
        File "/usr/local/lib/python3.7/site-packages/apache_beam/dataframe/io.py", line 260, in write_to
          self.writer(df, non_none_handle, *self.args, **self.kwargs)
        File "/usr/local/google/home/bhulette/.pyenv/versions/beam/lib/python3.7/site-packages/pandas/core/generic.py", line 3168, in to_csv
          .. versionchanged:: 0.24.0
      TypeError: __init__() got an unexpected keyword argument 'errors'
      

      Attachments

        Activity

          People

            bhulette Brian Hulette
            bhulette Brian Hulette
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 50m
                50m