[ 
https://issues.apache.org/jira/browse/BEAM-6454?focusedWorklogId=185923&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-185923
 ]

ASF GitHub Bot logged work on BEAM-6454:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Jan/19 18:14
            Start Date: 16/Jan/19 18:14
    Worklog Time Spent: 10m 
      Work Description: markflyhigh commented on pull request #7538: 
[BEAM-6454] Fix dict_values error in DataflowRunner
URL: https://github.com/apache/beam/pull/7538
 
 
   In python 3, dict.values() returns a view, rather than a list. So need to 
wrap it to a list. This fix a type error in DataflowRunner when running a 
pipeline on service:
   
   ```
     File 
".../tmp/beam4/sdks/python/apache_beam/runners/dataflow/dataflow_runner.py", 
line 461, in _get_encoded_output_coder
       transform_node.outputs.values()[0].pipeline._options)
   TypeError: 'dict_values' object does not support indexing
   ```
   +R: @tvalentyn 
   +cc: @robertwb 
   
   ------------------------
   
   Follow this checklist to help us incorporate your contribution quickly and 
easily:
   
    - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in 
ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA 
issue, if applicable. This will automatically link the pull request to the 
issue.
    - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   It will help us expedite review of your Pull Request if you tag someone 
(e.g. `@username`) to look at it.
   
   Post-Commit Tests Status (on master branch)
   
------------------------------------------------------------------------------------------------
   
   Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
   --- | --- | --- | --- | --- | --- | --- | ---
   Go | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/)
 | --- | --- | --- | --- | --- | ---
   Java | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/)<br>[![Build
 
Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)
   Python | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_Verify/lastCompletedBuild/)
 | --- | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/)
 </br> [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/)
 | [![Build 
Status](https://builds.apache.org/job/beam_PostCommit_Python_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_VR_Flink/lastCompletedBuild/)
 | --- | --- | ---
   
   
   
   
   
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 185923)
            Time Spent: 10m
    Remaining Estimate: 0h

> TypeError in DataflowRunner: dict_values does not support indexing
> ------------------------------------------------------------------
>
>                 Key: BEAM-6454
>                 URL: https://issues.apache.org/jira/browse/BEAM-6454
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-py-harness
>            Reporter: Mark Liu
>            Assignee: Mark Liu
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In python 3, dict.values() returns a view, rather than a list. So need to 
> wrap it to a list.
> Error in console output:
> {code:java}
> ERROR:root:Error while visiting read/Read/Impulse
> Traceback (most recent call last):
>   File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
>     "__main__", mod_spec)
>   File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
>     exec(code, run_globals)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/examples/wordcount.py",
>  line 136, in <module>
>     run()
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/examples/wordcount.py",
>  line 115, in run
>     result = p.run()
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/pipeline.py",
>  line 405, in run
>     self._options).run(False)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/pipeline.py",
>  line 418, in run
>     return self.runner.run_pipeline(self, self._options)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/runners/dataflow/dataflow_runner.py",
>  line 367, in run_pipeline
>     super(DataflowRunner, self).run_pipeline(pipeline, options)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/runners/runner.py",
>  line 176, in run_pipeline
>     pipeline.visit(RunVisitor(self))
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/pipeline.py",
>  line 446, in visit
>     self._root_transform().visit(visitor, self, visited)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/pipeline.py",
>  line 815, in visit
>     part.visit(visitor, pipeline, visited)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/pipeline.py",
>  line 815, in visit
>     part.visit(visitor, pipeline, visited)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/pipeline.py",
>  line 815, in visit
>     part.visit(visitor, pipeline, visited)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/pipeline.py",
>  line 818, in visit
>     visitor.visit_transform(self)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/runners/runner.py",
>  line 171, in visit_transform
>     self.runner.run_transform(transform_node, options)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/runners/runner.py",
>  line 214, in run_transform
>     return m(transform_node, options)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/runners/dataflow/dataflow_runner.py",
>  line 532, in run_Impulse
>     step.encoding = self._get_encoded_output_coder(transform_node)
>   File 
> "/usr/local/google/home/markliu/tmp/beam4/sdks/python/apache_beam/runners/dataflow/dataflow_runner.py",
>  line 461, in _get_encoded_output_coder
>     transform_node.outputs.values()[0].pipeline._options)
> TypeError: 'dict_values' object does not support indexing
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to