Skip to content

Fix retries raise condition on upload/download files.#314

Merged
iLLiCiTiT merged 1 commit intodevelopfrom
bugfix/fix_upload_retries
Mar 20, 2026
Merged

Fix retries raise condition on upload/download files.#314
iLLiCiTiT merged 1 commit intodevelopfrom
bugfix/fix_upload_retries

Conversation

@rdelillo
Copy link
Contributor

Changelog Description

Fix condition for raising when the max amount of retries is reached on upload/download.

Additional review information

  File "C:\Program Files\Ynput\AYON 1.5.2\dependencies\ayon_api\server_api.py", line 1794, in upload_file
    return self.upload_file_from_stream(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Ynput\AYON 1.5.2\dependencies\ayon_api\server_api.py", line 1745, in upload_file_from_stream
    return self._upload_file(
           ^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Ynput\AYON 1.5.2\dependencies\ayon_api\server_api.py", line 1701, in _upload_file
    response.raise_for_status()
    ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'raise_for_status'

Testing notes:

  1. Should work as before, no feature changes

@rdelillo rdelillo self-assigned this Mar 20, 2026
@rdelillo rdelillo added the type: bug Something isn't working label Mar 20, 2026
requests.exceptions.ConnectionError,
):
if attempt == retries:
if attempt == retries - 1:
Copy link
Contributor Author

@rdelillo rdelillo Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

range(3) == [0, 1, 2]

@iLLiCiTiT iLLiCiTiT merged commit d4ab2ee into develop Mar 20, 2026
3 checks passed
@iLLiCiTiT iLLiCiTiT deleted the bugfix/fix_upload_retries branch March 20, 2026 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sponsored type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants