Zach saw strange printouts that were a bit obscure. At the end of execution the LightApp object would be printed
<lightpath.ui.gui.LightApp object at 0x7fb92a00a280>
Ken noted that this was likely caused by a misconfiguration of the entrypoints.
$ python
Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:00:52)
[Clang 13.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.exit("puzzling printout")
puzzling printout
More tersely:
$ python -c "import sys; sys.exit('test')"; echo $?
test
1
Thus the return value from the entrypoint gets set as the argument to sys.exit. If it's not numeric, its string representation gets dumped to standard output and the process returns exit code 1.
Removing the return from the entrypoint function should resolve this.
Zach saw strange printouts that were a bit obscure. At the end of execution the LightApp object would be printed
Ken noted that this was likely caused by a misconfiguration of the entrypoints.
More tersely:
And the
lightpath
script has:Thus the return value from the entrypoint gets set as the argument to
sys.exit
. If it's not numeric, its string representation gets dumped to standard output and the process returns exit code1
.Removing the
return
from the entrypoint function should resolve this._Originally posted by @klauer in https://github.com/pcdshub/lightpath/pull/162#discussion_r984771966_