Make Agave restore client behavior return sensible error message when running naked container
mwvaughn opened this issue · comments
Matthew Vaughn commented
podman run -it sd2e/events-manager
results in
File "/reactors/utils.py", line 76, in get_client_with_mock_support
client = Agave.restore()
File "/usr/local/lib/python3.6/dist-packages/agavepy/agave.py", line 396, in restore
return Agave._restore_client()
File "/usr/local/lib/python3.6/dist-packages/agavepy/agave.py", line 374, in _restore_client
clients = Agave._read_clients()
File "/usr/local/lib/python3.6/dist-packages/agavepy/agave.py", line 344, in _read_clients
with open(Agave.agpy_path()) as agpy:
TypeError: expected str, bytes or os.PathLike object, not NoneType
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/reactor.py", line 222, in <module>
main()
File "/reactor.py", line 177, in main
rx = Reactor()
File "/reactors/utils.py", line 188, in __init__
self.client = get_client_with_mock_support()
File "/reactors/utils.py", line 78, in get_client_with_mock_support
raise AgaveError('Unable to restore Agave client: {}'.format(err))
agavepy.agave.AgaveError: Unable to restore Agave client: expected str, bytes or os.PathLike object, not NoneType
This is unintuitive because the user will not know how to set up an Agave client via environment variables from this error alone.