mar10 / pyftpsync

Synchronize directories using FTP(S), SFTP, or file system access.
https://pyftpsync.readthedocs.io
MIT License
117 stars 25 forks source link

Import error #49

Closed ngtrthanh closed 3 years ago

ngtrthanh commented 3 years ago

I install pypftsync with following detail on my machine: pyftpsync/3.1.0 Python/3.9.0 Windows-10-10.0.19041-SP0

When I try to run script

`from ftpsync.ftp_target import FTPTarget from ftpsync.synchronizers import UploadSynchronizer

local = FsTarget("~/temp") user ="joe" passwd = "secret" remote = FTPTarget("/temp", "example.com", username=user, password=passwd) opts = {"force": False, "delete_unmatched": True, "verbose": 3} s = UploadSynchronizer(local, remote, opts) s.run()`

I got error

from ftpsync.ftp_target import FTPTarget ImportError: cannot import name 'FTPTarget' from 'ftpsync.ftp_target'

Please support.

mar10 commented 3 years ago

The class FTPTarget was renamed with release 4.0 (named FtpTarget before). The documentation is a bit ahed of the time, I update the docs.