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

Apache Beam with Python 3 module module error

Details

    • Bug
    • Status: Resolved
    • P2
    • Resolution: Cannot Reproduce
    • None
    • Not applicable
    • runner-direct
    • None

    Description

      Hi Folks,

      • apache-beam==2.16.0

      when running Apache Beam with Python 3 I get the following error message

      module 'apache_beam.coders.coders' has no attribute 'VarIntCoder'
      

      Full Error

      Traceback (most recent call last):
        File "pipeline/pipeline.py", line 13, in <module>
          import apache_beam as beam
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/apache_beam/__init__.py", line 97, in <module>
          from apache_beam import coders
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/apache_beam/coders/__init__.py", line 19, in <module>
          from apache_beam.coders.coders import *
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/apache_beam/coders/coders.py", line 30, in <module>
          from future.moves import pickle
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/future/moves/__init__.py", line 8, in <module>
          import_top_level_modules()
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/future/standard_library/__init__.py", line 810, in import_top_level_modules
          with exclude_local_folder_imports(*TOP_LEVEL_MODULES):
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/future/standard_library/__init__.py", line 781, in __enter__
          module = __import__(m, level=0)
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/pipeline/test.py", line 14, in <module>
          from apache_beam.options.pipeline_options import PipelineOptions
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/apache_beam/options/pipeline_options.py", line 31, in <module>
          from apache_beam.transforms.display import HasDisplayData
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/apache_beam/transforms/__init__.py", line 23, in <module>
          from apache_beam.transforms import combiners
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/apache_beam/transforms/combiners.py", line 41, in <module>
          from apache_beam.transforms import core
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/apache_beam/transforms/core.py", line 38, in <module>
          from apache_beam.coders import typecoders
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/apache_beam/coders/typecoders.py", line 182, in <module>
          registry = CoderRegistry()
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/apache_beam/coders/typecoders.py", line 84, in __init__
          self.register_standard_coders(fallback_coder)
        File "/TWT/Development/machine-learning-framework/image-feature-extraction/python3/lib/python3.6/site-packages/apache_beam/coders/typecoders.py", line 88, in register_standard_coders
          self._register_coder_internal(int, coders.VarIntCoder)
      AttributeError: module 'apache_beam.coders.coders' has no attribute 'VarIntCoder'
      

      Are there any known issues or recommendations to solve this issue?

      Best regards
      Sascha

      Attachments

        Activity

          People

            Unassigned Unassigned
            sascha.heyer Sascha Heyer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: