Skip to content
This repository has been archived by the owner on Mar 29, 2022. It is now read-only.

Make Agave restore client behavior return sensible error message when running naked container #7

Open
mwvaughn opened this issue Aug 19, 2020 · 0 comments

Comments

@mwvaughn
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant