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

Can not run Stream wordcount Python Sample

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P0
    • Resolution: Invalid
    • Affects Version/s: 2.5.0
    • Fix Version/s: 2.5.0
    • Component/s: sdk-py-core
    • Labels:
      None
    • Environment:
      mac os

      Description

      https://beam.apache.org/documentation/sdks/python-streaming/

      python -m apache_beam.examples.streaming_wordcount \ --input_topic "projects/YOUR_PUBSUB_PROJECT_NAME/topics/YOUR_INPUT_TOPIC" \ --output_topic "projects/YOUR_PUBSUB_PROJECT_NAME/topics/YOUR_OUTPUT_TOPIC" \ --streaming
      

      got the following error:

      ERROR:root:Giving up after 4 attempts. WARNING:root:A task failed with exception: Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Users/bob/Library/Python/2.7/lib/python/site-packages/apache_beam/examples/streaming_wordcount.py", line 98, in <module> run() File "/Users/bob/Library/Python/2.7/lib/python/site-packages/apache_beam/examples/streaming_wordcount.py", line 93, in run result.wait_until_finish() File "/Users/bob/Library/Python/2.7/lib/python/site-packages/apache_beam/runners/direct/direct_runner.py", line 421, in wait_until_finish self._executor.await_completion() File "/Users/bob/Library/Python/2.7/lib/python/site-packages/apache_beam/runners/direct/executor.py", line 398, in await_completion self._executor.await_completion() File "/Users/bob/Library/Python/2.7/lib/python/site-packages/apache_beam/runners/direct/executor.py", line 444, in await_completion six.reraise(t, v, tb) File "/Users/bob/Library/Python/2.7/lib/python/site-packages/apache_beam/runners/direct/executor.py", line 341, in call finish_state) File "/Users/bob/Library/Python/2.7/lib/python/site-packages/apache_beam/runners/direct/executor.py", line 381, in attempt_call result = evaluator.finish_bundle() File "/Users/bob/Library/Python/2.7/lib/python/site-packages/apache_beam/runners/direct/transform_evaluator.py", line 305, in finish_bundle with self._source.reader() as reader: File "/Users/bob/Library/Python/2.7/lib/python/site-packages/apache_beam/io/gcp/pubsub.py", line 283, in reader raise NotImplementedError NotImplementedError
      When trying to run the streaming wordcount python sample from here: 
      

       

      Look like some method of pubsub io is not implemented yet.

      Please help to advise,

      Thanks

        Attachments

          Activity

            People

            • Assignee:
              altay Ahmet Altay
              Reporter:
              thangbui Bui Nguyen Thang

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment