输入apache\u beam.examples.wordcount

z4bn682m  于 2021-06-21  发布在  Flink
关注(0)|答案(1)|浏览(266)

我试图运行beam python sdk示例,但在读取输入时遇到问题。
https://cwiki.apache.org/confluence/display/beam/usage+guide#usageguide-runapython SDK管线
当我使用 gs://dataflow-samples/shakespeare/kinglear.txt 作为输入,错误是 apache_beam.io.filesystem.BeamIOError: Match operation failed with exceptions {'gs://dataflow-samples/shakespeare/kinglear.txt': TypeError("__init__() got an unexpected keyword argument 'response_encoding'",)} 当我使用我的本地文件时,它似乎没有真正读取文件,并且没有输出任何内容。结果不包括“has\u job”,我不知道它到底是什么意思https://github.com/apache/beam/blob/master/sdks/python/apache_beam/examples/wordcount.py#l118.

dbf7pr2w

dbf7pr2w1#

此错误是因为您的google apitools版本太旧。您需要v0.5.23或更新版本来避免此错误。
beampython对依赖项有严格的版本要求。如果您运行的是beam 2.11,则需要使用google apitools v0.5.26。

相关问题