pearu / ftpsync2d

Automatically exported from code.google.com/p/ftpsync2d
6 stars 3 forks source link

Example #5

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

your example "ftpsync.py ftp://ftp.example.com/rdir ldir --download" gives an 
assertion error.  I just cant work out in what format the login and folder 
details need to be put. Could you give an example with user name and password 
please.

Cheers

Original issue reported on code.google.com by biggle...@gmail.com on 25 Oct 2011 at 11:38

GoogleCodeExporter commented 9 years ago
Could you be more specific on what assertion error is raised? Pasting the used 
command line (sensitive information can be marked with x-s) and the full 
output, including errors, of the script should be sufficient to give hints what 
could be wrong.

Original comment by pearu.peterson on 26 Oct 2011 at 5:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hello, sorry was meaning to add an example:

C:\>python ftpsync.py ftp://ftp.example.com/rdir ldir --download

Traceback (most recent call last):
  File "ftpsync.py", line 504, in <module>
    main()
  File "ftpsync.py", line 459, in main
    session = FtpSession(remote_path)
  File "ftpsync.py", line 49, in __init__
    assert remote_path.startswith('/'),`remote_path`
AssertionError: '\\rdir'

Original comment by biggle...@gmail.com on 26 Oct 2011 at 6:49

GoogleCodeExporter commented 9 years ago
The problem us due to os.path.normpath that under Windows replaces '/' with '\'.
As a fix, I just committed a patch that uses posixpath.normpath instead.
Let us know if it works.

Original comment by pearu.peterson on 26 Oct 2011 at 8:27

GoogleCodeExporter commented 9 years ago
Hello,

Thanks for the quick fix, unfortunately I can't test it though as I don't have 
Python version 3.0 installed, due to incompatibility issues with other software.

Cheers

Original comment by biggle...@gmail.com on 26 Oct 2011 at 10:13

GoogleCodeExporter commented 9 years ago
The fix does not require Python 3. The script should run with Python 2.x 
versions.

Original comment by pearu.peterson on 27 Oct 2011 at 4:51

GoogleCodeExporter commented 9 years ago
Hello, my mistake I thought urlpase could only be used with version 3.0.  your 
patch has fixed that problem.  Cheers!

Original comment by biggle...@gmail.com on 28 Oct 2011 at 1:18

GoogleCodeExporter commented 9 years ago
I have the same error. Where do I get this patch?

Original comment by jedilando on 28 Jul 2012 at 4:41