thinker0 commented on pull request #3735:
URL: https://github.com/apache/incubator-heron/pull/3735#issuecomment-968203904


   It worked fine in package, but it seems that the code and resource location 
are different when pex is executed.
   ```
    % 
./bazel-bin/integration_test/src/python/local_test_runner/local-test-runner
   Traceback (most recent call last):
     File 
"/Users/thinker0/.pex/unzipped_pexes/711d1b3191bfc9248ac2f22a0e8bd8a6c5687d01/.bootstrap/pex/pex.py",
 line 476, in execute
       exit_value = self._wrap_coverage(self._wrap_profiling, self._execute)
     File 
"/Users/thinker0/.pex/unzipped_pexes/711d1b3191bfc9248ac2f22a0e8bd8a6c5687d01/.bootstrap/pex/pex.py",
 line 401, in _wrap_coverage
       return runner(*args)
     File 
"/Users/thinker0/.pex/unzipped_pexes/711d1b3191bfc9248ac2f22a0e8bd8a6c5687d01/.bootstrap/pex/pex.py",
 line 432, in _wrap_profiling
       return runner(*args)
     File 
"/Users/thinker0/.pex/unzipped_pexes/711d1b3191bfc9248ac2f22a0e8bd8a6c5687d01/.bootstrap/pex/pex.py",
 line 532, in _execute
       return self.execute_entry(self._pex_info.entry_point)
     File 
"/Users/thinker0/.pex/unzipped_pexes/711d1b3191bfc9248ac2f22a0e8bd8a6c5687d01/.bootstrap/pex/pex.py",
 line 679, in execute_entry
       return self.execute_module(entry_point, alter_sys)
     File 
"/Users/thinker0/.pex/unzipped_pexes/711d1b3191bfc9248ac2f22a0e8bd8a6c5687d01/.bootstrap/pex/pex.py",
 line 691, in execute_module
       runpy.run_module(module_name, run_name="__main__", alter_sys=alter_sys)
     File 
"/usr/local/Cellar/[email protected]/3.8.12_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py",
 line 207, in run_module
       return _run_module_code(code, init_globals, run_name, mod_spec)
     File 
"/usr/local/Cellar/[email protected]/3.8.12_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py",
 line 97, in _run_module_code
       _run_code(code, mod_globals, init_globals,
     File 
"/usr/local/Cellar/[email protected]/3.8.12_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py",
 line 87, in _run_code
       exec(code, run_globals)
     File 
"/Users/thinker0/.pex/unzipped_pexes/711d1b3191bfc9248ac2f22a0e8bd8a6c5687d01/integration_test/src/python/local_test_runner/main.py",
 line 180, in <module>
       main()
     File 
"/Users/thinker0/.pex/unzipped_pexes/711d1b3191bfc9248ac2f22a0e8bd8a6c5687d01/integration_test/src/python/local_test_runner/main.py",
 line 115, in main
       conf_string = pkgutil.get_data(__name__, conf_file).decode()
     File 
"/usr/local/Cellar/[email protected]/3.8.12_1/Frameworks/Python.framework/Versions/3.8/lib/python3.8/pkgutil.py",
 line 638, in get_data
       return loader.get_data(resource_name)
     File "<frozen importlib._bootstrap_external>", line 1032, in get_data
   FileNotFoundError: [Errno 2] No such file or directory: 
'/Users/thinker0/.pex/unzipped_pexes/711d1b3191bfc9248ac2f22a0e8bd8a6c5687d01/integration_test/src/python/local_test_runner/integration_test/src/python/local_test_runner/resources/test.conf'
   thinker0@house3s-iMac heron % find /Users/thinker0/.pex/ -name test.conf -ls
   13001283648        8 -rw-r-----    1 thinker0         staff                 
471 Nov 14 13:12 
/Users/thinker0/.pex//user_code/068ce22b8f5f9a55a36f8b5366021bc93c943fcd/integration_test/src/python/local_test_runner/resources/test.conf
   ```


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