Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actors.get_client() issue #57

Open
JoshuaUrrutia opened this issue Jul 11, 2023 · 1 comment
Open

actors.get_client() issue #57

JoshuaUrrutia opened this issue Jul 11, 2023 · 1 comment

Comments

@JoshuaUrrutia
Copy link

actors.get_client() returns a base url with a trailing slash, which doesn't work for listing endpoints, ex:

from tapipy import actors, util, errors
from tapipy.tapis import Tapis

def main() -> None:
    context = actors.get_context()  
    t = actors.get_client()
    files = t.files.listFiles(systemId='frontera', path='/work2/05369/urrutia/frontera/inputs/')
Traceback (most recent call last):
  File "/opt/reactor.py", line 47, in <module>
    main()
  File "/opt/reactor.py", line 18, in main
    files=t.files.listFiles(systemId='frontera', path='/work2/05369/urrutia/frontera/inputs/')
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/tapipy/tapis.py", line 1218, in __call__
    raise errors.NotFoundError(msg=error_msg, version=version, request=r, response=resp)
tapipy.errors.NotFoundError: message: HTTP 404 Not Found

(and indeed that directory exists on this tenant)

We'll need to strip away the trailing slash on _abaco_api_server, ex:

"_abaco_api_server": "https://tacc.tapis.io/",

https://github.com/tapis-project/tapipy/blob/main/tapipy/actors.py#L23C70-L23C70

@JoshuaUrrutia
Copy link
Author

see:
#58

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

No branches or pull requests

1 participant