Abacn commented on issue #26836:
URL: https://github.com/apache/beam/issues/26836#issuecomment-1573128291
Create does not reproduce it because Create create elements at pipeline
construction time, while ReadFromText is a SDF source. A simpler way to
reproduce is to use a synthetic_source (which is also a SDF source)
```
with beam.Pipeline() as pipeline:
batches_with_keys = (
pipeline
| beam.io.Read(SyntheticSource({'numRecords': 10, 'keySizeBytes': 1,
'valueSizeBytes': 1}))
| "Group key" >> beam.GroupIntoBatches(2, 1)
| beam.Map(print)
)
```
Error message (master):
```
ERROR:apache_beam.runners.direct.executor:Giving up after 4 attempts.
WARNING:apache_beam.runners.direct.executor:A task failed with exception:
create_invoker() takes at least 2 positional arguments (1 given) [while running
'Read/SDFBoundedSourceReader/ParDo(SDFBoundedSourceDoFn)/pair']
Traceback (most recent call last):
File "apache_beam\runners\common.py", line 1459, in
apache_beam.runners.common.DoFnRunner._invoke_bundle_method
File "apache_beam\runners\common.py", line 554, in
apache_beam.runners.common.DoFnInvoker.invoke_start_bundle
File "apache_beam\runners\common.py", line 560, in
apache_beam.runners.common.DoFnInvoker.invoke_start_bundle
File
"F:\Py\beampy38\lib\site-packages\apache_beam\runners\direct\sdf_direct_runner.py",
line 122, in start_bundle
self._invoker = DoFnInvoker.create_invoker(
File "apache_beam\runners\common.py", line 444, in
apache_beam.runners.common.DoFnInvoker.create_invoker
TypeError: create_invoker() takes at least 2 positional arguments (1 given)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".\groupintobatchtest.py", line 9, in <module>
batches_with_keys = (
File "F:\Py\beampy38\lib\site-packages\apache_beam\pipeline.py", line 601,
in __exit__
self.result.wait_until_finish()
File
"F:\Py\beampy38\lib\site-packages\apache_beam\runners\direct\direct_runner.py",
line 588, in wait_until_finish
self._executor.await_completion()
File
"F:\Py\beampy38\lib\site-packages\apache_beam\runners\direct\executor.py", line
432, in await_completion
self._executor.await_completion()
File
"F:\Py\beampy38\lib\site-packages\apache_beam\runners\direct\executor.py", line
480, in await_completion
raise update.exception
File
"F:\Py\beampy38\lib\site-packages\apache_beam\runners\direct\executor.py", line
370, in call
self.attempt_call(
File
"F:\Py\beampy38\lib\site-packages\apache_beam\runners\direct\executor.py", line
404, in attempt_call
evaluator.start_bundle()
File
"F:\Py\beampy38\lib\site-packages\apache_beam\runners\direct\transform_evaluator.py",
line 870, in start_bundle
self.runner.start()
File "apache_beam\runners\common.py", line 1476, in
apache_beam.runners.common.DoFnRunner.start
File "apache_beam\runners\common.py", line 1461, in
apache_beam.runners.common.DoFnRunner._invoke_bundle_method
File "apache_beam\runners\common.py", line 1508, in
apache_beam.runners.common.DoFnRunner._reraise_augmented
File "apache_beam\runners\common.py", line 1459, in
apache_beam.runners.common.DoFnRunner._invoke_bundle_method
File "apache_beam\runners\common.py", line 554, in
apache_beam.runners.common.DoFnInvoker.invoke_start_bundle
File "apache_beam\runners\common.py", line 560, in
apache_beam.runners.common.DoFnInvoker.invoke_start_bundle
File
"F:\Py\beampy38\lib\site-packages\apache_beam\runners\direct\sdf_direct_runner.py",
line 122, in start_bundle
self._invoker = DoFnInvoker.create_invoker(
File "apache_beam\runners\common.py", line 444, in
apache_beam.runners.common.DoFnInvoker.create_invoker
TypeError: create_invoker() takes at least 2 positional arguments (1 given)
[while running 'Read/SDFBoundedSourceReader/ParDo(SDFBoundedSourceDoFn)/pair']
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]