[ https://issues.apache.org/jira/browse/BEAM-8311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16937272#comment-16937272 ]
Yichi Zhang commented on BEAM-8311: ----------------------------------- [https://github.com/apache/beam/pull/9656] needs to be cherry-picked as well. > Fix python mongodbio display data type > -------------------------------------- > > Key: BEAM-8311 > URL: https://issues.apache.org/jira/browse/BEAM-8311 > Project: Beam > Issue Type: Bug > Components: sdk-py-core > Reporter: Yichi Zhang > Assignee: Yichi Zhang > Priority: Blocker > Fix For: 2.16.0 > > Time Spent: 0.5h > Remaining Estimate: 0h > > When I try to write document to mongodb through > | "Write User Doc to Mongo" >> beam.io.WriteToMongoDB(uri=MONGO_URI, > db="dbname", > coll="col_name" > )) > Error {{ValueError: Invalid DisplayDataItem. Value {} is of an unsupported > type.}} > ERROR:root:Error while visiting Write User Doc to Mongo/ParDo(_WriteMongoFn) > Traceback (most recent call last): > File "beam_home.py", line 317, in <module> > run() > File "beam_home.py", line 312, in run > p.run().wait_until_finish() > File "/usr/local/lib/python2.7/site-packages/apache_beam/pipeline.py", line > 406, in run > self._options).run(False) > File "/usr/local/lib/python2.7/site-packages/apache_beam/pipeline.py", line > 419, in run > return self.runner.run_pipeline(self, self._options) > File > "/usr/local/lib/python2.7/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", > line 469, in run_pipeline > super(DataflowRunner, self).run_pipeline(pipeline, options) > File > "/usr/local/lib/python2.7/site-packages/apache_beam/runners/runner.py", line > 158, in run_pipeline > pipeline.visit(RunVisitor(self)) > File "/usr/local/lib/python2.7/site-packages/apache_beam/pipeline.py", line > 447, in visit > self._root_transform().visit(visitor, self, visited) > File "/usr/local/lib/python2.7/site-packages/apache_beam/pipeline.py", line > 824, in visit > part.visit(visitor, pipeline, visited) > File "/usr/local/lib/python2.7/site-packages/apache_beam/pipeline.py", line > 824, in visit > part.visit(visitor, pipeline, visited) > File "/usr/local/lib/python2.7/site-packages/apache_beam/pipeline.py", line > 827, in visit > visitor.visit_transform(self) > File > "/usr/local/lib/python2.7/site-packages/apache_beam/runners/runner.py", line > 153, in visit_transform > self.runner.run_transform(transform_node, options) > File > "/usr/local/lib/python2.7/site-packages/apache_beam/runners/runner.py", line > 196, in run_transform > return m(transform_node, options) > File > "/usr/local/lib/python2.7/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", > line 807, in run_ParDo > transform_node.transform.output_tags) > File > "/usr/local/lib/python2.7/site-packages/apache_beam/runners/dataflow/dataflow_runner.py", > line 590, in _add_step > DisplayData.create_from(transform_node.transform).items]) > File > "/usr/local/lib/python2.7/site-packages/apache_beam/transforms/display.py", > line 274, in get_dict > self.is_valid() > File > "/usr/local/lib/python2.7/site-packages/apache_beam/transforms/display.py", > line 246, in is_valid > .format(self.value)) > ValueError: Invalid DisplayDataItem. Value {} is of an unsupported type. > -- This message was sent by Atlassian Jira (v8.3.4#803005)