[ 
https://issues.apache.org/jira/browse/BEAM-12234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Stephan Hoyer updated BEAM-12234:
---------------------------------
    Description: 
Running the example from the interactive Beam README doc [1] produces an error:

{code:python}
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!
{code}

Results in:
{code}
---------------------------------------------------------------------------
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'
{code}

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
 

 

  was:
Running the example from the interactive Beam README doc [1] produces an error:

{code:python}
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!
{code}

Results in:
{{code}}
---------------------------------------------------------------------------
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'
{{code}}

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
 

 


> README example for Beam Python InteractiveRunner is broken
> ----------------------------------------------------------
>
>                 Key: BEAM-12234
>                 URL: https://issues.apache.org/jira/browse/BEAM-12234
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-py-interactive
>    Affects Versions: 2.28.0
>            Reporter: Stephan Hoyer
>            Priority: P2
>
> Running the example from the interactive Beam README doc [1] produces an 
> error:
> {code:python}
> 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!
> {code}
> Results in:
> {code}
> ---------------------------------------------------------------------------
> 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'
> {code}
> 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
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to