Skip to content

Conversation

@MadsHangaard
Copy link

@MadsHangaard MadsHangaard commented Jan 23, 2026

Changelog Description

  • Resolves ImportERROR on SiteSync start when using SFTP provider.
  • Removes dependency: pysftp
  • Adds dependency: sftpretty

resolve #17

Additional review information

pysftp throws and error when imported, as it imports features from paramiko that has been removed due to deprecation. pysftp is an unmaintained library. This PR replaces pysftp with sftpretty which is a maintained fork of pysftp.

Testing notes:

  1. Update package
  2. Update dependency
  3. Add site with SFTP provider to ayon+settings://sitesync
  4. Launch Ayon launcher, no ImportERROR should appear
  5. Download & Upload via SiteSync SFTP Provider

@iLLiCiTiT iLLiCiTiT requested a review from kalisp January 23, 2026 11:15
Comment on lines 12 to 13
import sftpretty
import paramiko
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
import sftpretty
import paramiko
sftpretty= None
try:
import sftpretty
import paramiko
except (ImportError, SyntaxError):
pass

Copy link
Author

Choose a reason for hiding this comment

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

Hey Jakub, thanks for taking a look at it. I'm not super familiar with the PR process. Should I add this suggestion to my PR? Or will you guys add it, in the review process? :)

Copy link
Member

Choose a reason for hiding this comment

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

HI, thanks for the PR.

Yes, you have to add the suggestions in your branch so it is part of the PR. You can either do local changes and push them or with "suggestion" comments you can just use the Commit suggestion button (if you agree with the changes, to fultill the review process).

Copy link
Author

Choose a reason for hiding this comment

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

I removed this part, as I didn't quite understand the utility of not failing immediately, only to fail later. Would you mind explaining the thought process behind it?

Furthermore, I removed this part:

if not pysftp:
    raise ImportError

Which should probably be re-added with sftpretty. In case of adding the try/except block on import.

if not sftpretty:
    raise ImportError

@iLLiCiTiT iLLiCiTiT added type: enhancement Improvement of existing functionality or minor addition bump minor community Issues and PRs coming from the community members labels Jan 23, 2026
…t error later exactly like previous code, just with sftpretty.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump minor community Issues and PRs coming from the community members type: enhancement Improvement of existing functionality or minor addition

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Weird warning about SFTP library

2 participants