You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 20:01:36 UTC

[GitHub] [beam] damccorm opened a new issue, #20877: README example for Beam Python InteractiveRunner is broken

damccorm opened a new issue, #20877:
URL: https://github.com/apache/beam/issues/20877

   Running the example from the interactive Beam README doc [1] produces an error:
   
   ```
   
   import apache_beam as beam
   from apache_beam.runners.interactive.interactive_runner import InteractiveRunner
   
   p
   = beam.Pipeline(InteractiveRunner())
   pcoll = p | beam.Create([1, 2, 3])
   result = p.run().wait_until_finish()
   pcoll_list
   = result.get(pcoll)  # This returns a list!
   
   ```
   
   
   Results in:
   ```
   
   ---------------------------------------------------------------------------
   AttributeError       
                       Traceback (most recent call last)
   <ipython-input-11-b3606ce83458> in <module>()
   
        2 pcoll = p | beam.Create([1, 2, 3])
         3 result = p.run().wait_until_finish()
   ----> 4 pcoll_list
   = result.get(pcoll)  # This returns a list!
   
   AttributeError: 'NoneType' object has no attribute 'get'
   
   ```
   
   
   Side note: I had to look-up the import statements here. As long as you're updating the example, it would be nice for it to be runnable with copy & paste.
   
   [1] https://github.com/apache/beam/blob/master/sdks/python/apache_beam/runners/interactive/README.md 
   
    
   
   Imported from Jira [BEAM-12234](https://issues.apache.org/jira/browse/BEAM-12234). Original Jira may contain additional context.
   Reported by: shoyer.


-- 
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: github-unsubscribe@beam.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] KevinGG commented on issue #20877: README example for Beam Python InteractiveRunner is broken

Posted by GitBox <gi...@apache.org>.
KevinGG commented on issue #20877:
URL: https://github.com/apache/beam/issues/20877#issuecomment-1164677870

   I'll update the README.md. 
   
   This is pseudo code, the error lies within the `p.run().wait_until_finish()` but `wait_until_finish()` doesn't return the result. It should be
   ```python
   result = p.run()
   result.wait_until_finish()
   ```
   Still the usage is discouraged, let's honor `ib.collect` in this scenario.


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] KevinGG closed issue #20877: README example for Beam Python InteractiveRunner is broken

Posted by GitBox <gi...@apache.org>.
KevinGG closed issue #20877: README example for Beam Python InteractiveRunner is broken
URL: https://github.com/apache/beam/issues/20877


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [beam] tvalentyn commented on issue #20877: README example for Beam Python InteractiveRunner is broken

Posted by GitBox <gi...@apache.org>.
tvalentyn commented on issue #20877:
URL: https://github.com/apache/beam/issues/20877#issuecomment-1164347841

   @KevinGG is this still an issue?


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org