TypeError: Receiver() takes no arguments (when running any pipeline with DirectRunner)

我是研究僧i 提交于 2020-01-16 08:42:17

问题


I had my pipeline working locally, with DirectRunner, and suddenly it started to fail. To make sure it was not me messing with the code, I tested again with the standard wordcount.py example. Same result:

TypeError: Receiver() takes no arguments

Any idea of why am I getting that error now with any pipeline, please? Python version is 3.7.6, Apache Beam version is 2.16.0.

Command line output below (wordcount.py example code, untouched):

(venv37) PS C:\Users\mnight\Documents\myproject\microservices\beam> python .\wordcount.py --output gs://myproject-beam/temp/wordcount-out.txt
INFO:root:Missing pipeline option (runner). Executing pipeline using the default runner: DirectRunner.
INFO:root:Setting socket default timeout to 60 seconds.
INFO:root:socket default timeout is 60.0econds.
INFO:oauth2client.transport:Attempting refresh to obtain initial access_token
INFO:oauth2client.client:Refreshing access_token
INFO:root:==================== <function annotate_downstream_side_inputs at 0x000001EBB58ED678> ====================
INFO:root:==================== <function fix_side_input_pcoll_coders at 0x000001EBB58ED798> ====================
INFO:root:==================== <function lift_combiners at 0x000001EBB58ED828> ====================
INFO:root:==================== <function expand_sdf at 0x000001EBB58ED8B8> ====================
INFO:root:==================== <function expand_gbk at 0x000001EBB58ED948> ====================
INFO:root:==================== <function sink_flattens at 0x000001EBB58EDA68> ====================
INFO:root:==================== <function greedily_fuse at 0x000001EBB58EDAF8> ====================
INFO:root:==================== <function read_to_impulse at 0x000001EBB58EDB88> ====================
INFO:root:==================== <function impulse_to_input at 0x000001EBB58EDC18> ====================
INFO:root:==================== <function inject_timer_pcollections at 0x000001EBB58EDDC8> ====================
INFO:root:==================== <function sort_stages at 0x000001EBB58EDE58> ====================
INFO:root:==================== <function window_pcollection_coders at 0x000001EBB58EDEE8> ====================
INFO:root:Running (((ref_AppliedPTransform_read/Read_3)+(ref_AppliedPTransform_split_4))+(ref_AppliedPTransform_pair_with_one_5))+(group/Write)
Traceback (most recent call last):
  File ".\wordcount.py", line 138, in <module>
    run()
  File ".\wordcount.py", line 117, in run
    result = p.run()
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\pipeline.py", line 407, in run
    self._options).run(False)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\pipeline.py", line 420, in run
    return self.runner.run_pipeline(self, self._options)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\direct\direct_runner.py", line 129, in run_pipeline
    return runner.run_pipeline(pipeline, options)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\portability\fn_api_runner.py", line 371, in run_pipeline
    default_environment=self._default_environment))
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\portability\fn_api_runner.py", line 378, in run_via_runner_api
    return self.run_stages(stage_context, stages)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\portability\fn_api_runner.py", line 460, in run_stages
    stage_context.safe_coders)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\portability\fn_api_runner.py", line 738, in _run_stage
    result, splits = bundle_manager.process_bundle(data_input, data_output)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\portability\fn_api_runner.py", line 1719, in process_bundle
    part, expected_outputs), part_inputs):
  File "C:\Users\mnight\AppData\Local\Programs\Python\Python37\Lib\concurrent\futures\_base.py", line 598, in result_iterator
    yield fs.pop().result()
  File "C:\Users\mnight\AppData\Local\Programs\Python\Python37\Lib\concurrent\futures\_base.py", line 435, in result
    return self.__get_result()
  File "C:\Users\mnight\AppData\Local\Programs\Python\Python37\Lib\concurrent\futures\_base.py", line 384, in __get_result
    raise self._exception
  File "C:\Users\mnight\AppData\Local\Programs\Python\Python37\Lib\concurrent\futures\thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\portability\fn_api_runner.py", line 1719, in <lambda>
    part, expected_outputs), part_inputs):
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\portability\fn_api_runner.py", line 1657, in process_bundle
    result_future = self._worker_handler.control_conn.push(process_bundle_req)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\portability\fn_api_runner.py", line 1085, in push
    response = self.worker.do_instruction(request)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 343, in do_instruction
    request.instruction_id)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\worker\sdk_worker.py", line 369, in process_bundle
    bundle_processor.process_bundle(instruction_id))
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 663, in process_bundle
    data.ptransform_id].process_encoded(data.data)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\worker\bundle_processor.py", line 143, in process_encoded
    self.output(decoded_value)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\apache_beam\runners\worker\operations.py", line 256, in output
    cython.cast(Receiver, self.receivers[output_index]).receive(windowed_value)
  File "C:\Users\mnight\Documents\myproject\microservices\beam\venv37\lib\site-packages\Cython\Shadow.py", line 165, in cast
    return type(*args)
TypeError: Receiver() takes no arguments
(venv37) PS C:\Users\mnight\Documents\myproject\microservices\beam>

Thanks!

来源:https://stackoverflow.com/questions/59667289/typeerror-receiver-takes-no-arguments-when-running-any-pipeline-with-directr

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!