tvalentyn commented on a change in pull request #16154:
URL: https://github.com/apache/beam/pull/16154#discussion_r794164784



##########
File path: sdks/python/apache_beam/examples/complete/autocomplete.py
##########
@@ -40,7 +40,7 @@ def run(argv=None):
   # We use the save_main_session option because one or more DoFn's in this
   # workflow rely on global context (e.g., a module imported at module level).
   pipeline_options = PipelineOptions(pipeline_args)
-  pipeline_options.view_as(SetupOptions).save_main_session = True
+  pipeline_options.view_as(SetupOptions).save_main_session = save_main_session

Review comment:
       for posterity as Jenkins logs don't last:
   ```
   Error Message
   RecursionError: maximum recursion depth exceeded while calling a Python 
object
   Stacktrace
   self = <apache_beam.examples.complete.autocomplete_test.AutocompleteTest 
testMethod=test_autocomplete_output_files_on_small_input>
   
       @pytest.mark.examples_postcommit
       def test_autocomplete_output_files_on_small_input(self):
         EXPECTED_PREFIXES = "t: [(3, 'to'), (2, 'this'), (1, 'that')]\n" \
                               "th: [(2, 'this'), (1, 'that')]\n" \
                               "thi: [(2, 'this')]\n" \
                               "this: [(2, 'this')]\n" \
                               "tha: [(1, 'that')]\n" \
                               "that: [(1, 'that')]\n" \
                               "to: [(3, 'to')]"
       
         # Setup the files with expected content.
         temp_folder = tempfile.mkdtemp()
         self.create_file(
             os.path.join(temp_folder, 'input.txt'), ' '.join(self.WORDS))
         autocomplete.run([
             '--input=%s/input.txt' % temp_folder,
             '--output',
   >         os.path.join(temp_folder, 'result')
         ])
   
   apache_beam/examples/complete/autocomplete_test.py:99: 
   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ 
   apache_beam/examples/complete/autocomplete.py:56: in run
       | 'write' >> WriteToText(known_args.output))
   apache_beam/pipeline.py:596: in __exit__
       self.result = self.run()
   apache_beam/pipeline.py:570: in run
       pickler.dump_session(os.path.join(tmpdir, 'main_session.pickle'))
   apache_beam/internal/pickler.py:61: in dump_session
       return desired_pickle_lib.dump_session(file_path)
   apache_beam/internal/dill_pickler.py:307: in dump_session
       dill.load_session(file_path)
   
../../build/gradleenv/1398941891/lib/python3.7/site-packages/dill/_dill.py:368: 
in load_session
       module = unpickler.load()
   
../../build/gradleenv/1398941891/lib/python3.7/site-packages/dill/_dill.py:472: 
in load
       obj = StockUnpickler.load(self)
   
../../build/gradleenv/1398941891/lib/python3.7/site-packages/execnet/gateway_base.py:143:
 in __getattr__
       locs = self._importdef.get(name)
   
../../build/gradleenv/1398941891/lib/python3.7/site-packages/execnet/gateway_base.py:143:
 in __getattr__
       locs = self._importdef.get(name)
   
../../build/gradleenv/1398941891/lib/python3.7/site-packages/execnet/gateway_base.py:143:
 in __getattr__
       locs = self._importdef.get(name)
   E   RecursionError: maximum recursion depth exceeded while calling a Python 
object
   !!! Recursion detected (same locals & position)
   ```




-- 
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]


Reply via email to