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

Bug: base url with s3 failed in check_write_permissions #706

Closed
Shm013 opened this issue Jul 1, 2022 · 5 comments
Closed

Bug: base url with s3 failed in check_write_permissions #706

Shm013 opened this issue Jul 1, 2022 · 5 comments

Comments

@Shm013
Copy link

Shm013 commented Jul 1, 2022

I have error in check_write_permissions when set 3S target as default_output_uri after this commit 21712a7#diff-bc25f5894da3c404d2b542d9da72ed37c7a42522b4032f2530beaf560210b653

Traceback (most recent call last):
  File "/home/shm/Documents/project/CMLP/examples/./clearml_test_local.py", line 9, in <module>
    task = Task.init(project_name="great project", task_name="best experiment")
  File "/home/shm/Documents/project/CMLP/examples/venv/lib/python3.9/site-packages/clearml/task.py", line 602, in init
    task.output_uri = cls.__default_output_uri
  File "/home/shm/Documents/project/CMLP/examples/venv/lib/python3.9/site-packages/clearml/task.py", line 1084, in output_uri
    helper.check_write_permissions(value)
  File "/home/shm/Documents/project/CMLP/examples/venv/lib/python3.9/site-packages/clearml/storage/helper.py", line 851, in check_write_permissions
    err_msg = 'Insufficient permissions ({} failed) for ' + base_url
  File "/home/shm/Documents/project/CMLP/examples/venv/lib/python3.9/site-packages/clearml/utilities/proxy_object.py", line 286, in method
    mtd = getattr(obj, name)
AttributeError: 'str' object has no attribute '__radd__'

It fixes with

err_msg = 'Insufficient permissions ({} failed) for ' + str(base_url)

in 847 line clearml/storage/helper.py

@jkhenning
Copy link
Member

Hi @Shm013 ,

Can you please try using v1.6.2rc0 and see if it solves your issue?

@Shm013
Copy link
Author

Shm013 commented Jul 3, 2022

v1.6.2rc0 works fine!
1.6.0 and 1.6.1 - are failed.

@Shm013
Copy link
Author

Shm013 commented Jul 3, 2022

I can't find any changes in code that involved with this bug.
How do you fixed that?

@jkhenning
Copy link
Member

Hi @Shm013,

I'll be releasing the formal version today and updating the code, it was basically solved by changing the format string construction to using a safer conversion (as the + operator caused issues with the URL value that might be lazily loaded)

@jkhenning
Copy link
Member

@Shm013 v1.6.2 is out 🙂

@Shm013 Shm013 closed this as completed Jul 4, 2022
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

2 participants