Custom Query (104 matches)

Filters
 
Or
 
  
 
Columns

Show under each result:


Results (31 - 33 of 104)

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Ticket Resolution Summary Owner Reporter
#78 fixed Error when using ftputil with M2Crypto schwa schwa
Description

Reported by Roger Demetrescu:

"""

I'm trying to connect to a FTP server that only allow encrypted connection. Here is the screenshot of a WinSCP configuration that works perfectly:

http://postimg.org/image/8yqzs2gwp/

Problem is I am unable to do this kind of connection with ftputil using the recipe from:

http://ftputil.sschwarzer.net/trac/wiki/Documentation#does-ftputil-support-ssl

I am using:

  • ftputil 3.0
  • python 2.7.5+
  • Ubuntu 13.10

The production environment will be running python 2.6.

When I use de above recipe, I can connect to the ftp server, but when ftputil tries to send commands, it receives this kind of errors:

>>> host.chdir('/imprensa')
PermanentError: 500 Unknown command.

>>> host.listdir('.')
InaccessibleLoginDirError: directory '/' is not accessible

Just to make it clear, when I connect to the server using WinSCP, I am allowed to list the "/" directory.

"""

#77 fixed `UnicodeDecodeError` when server sends non-ASCII error messages schwa schwa
Description

reported by Roger Demetrescu:

"""

I've found an issue with ftputil 3.0 when trying to use host.makedirs() and part of the path already exists AND the FTP server gives error messages with accented characters.

I created 2 virtualenvs:

  • python 2.7 (also happens with python 2.6)
  • ftputil 2.8 and ftputil 3.0

FTP Server messages are in brazilian portuguese language.

When I use:

host.makedirs('/aaa/bbb/ccc')

and /aaa doesn't exist, all directories are created successfully.

BUT, when "/aaa" already exists, that's what happens:

ftputil 2.8

>>> host.makedirs('/aaa/bbb/ccc')
*cmd* 'CWD /'
*put* 'CWD /\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'
*cmd* 'CWD /'
*put* 'CWD /\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'
*cmd* 'MKD aaa'
*put* 'MKD aaa\r\n'
*get* '550 aaa: N\xe3o \xe9 poss\xedvel criar um arquivo j\xe1
existente.\r\n'
*resp* '550 aaa: N\xe3o \xe9 poss\xedvel criar um arquivo j\xe1 existente.'
*cmd* 'CWD /'
*put* 'CWD /\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'
*cmd* 'CWD /'
*put* 'CWD /\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'
*cmd* 'CWD /aaa'
*put* 'CWD /aaa\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'
*cmd* 'MKD bbb'
*put* 'MKD bbb\r\n'
*get* '257 "bbb" directory created.\r\n'
*resp* '257 "bbb" directory created.'
*cmd* 'CWD /'
*put* 'CWD /\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'
*cmd* 'CWD /'
*put* 'CWD /\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'
*cmd* 'CWD /aaa/bbb'
*put* 'CWD /aaa/bbb\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'
*cmd* 'MKD ccc'
*put* 'MKD ccc\r\n'
*get* '257 "ccc" directory created.\r\n'
*resp* '257 "ccc" directory created.'
*cmd* 'CWD /'
*put* 'CWD /\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'

ftputil 3.0

>>> host.makedirs('/aaa/bbb/ccc')
*cmd* u'CWD /'
*put* u'CWD /\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'
*cmd* u'CWD /'
*put* u'CWD /\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'
*cmd* u'MKD aaa'
*put* u'MKD aaa\r\n'
*get* '550 aaa: N\xe3o \xe9 poss\xedvel criar um arquivo j\xe1
existente.\r\n'
*resp* '550 aaa: N\xe3o \xe9 poss\xedvel criar um arquivo j\xe1 existente.'
*cmd* u'CWD /'
*put* u'CWD /\r\n'
*get* '250 CWD command successful.\r\n'
*resp* '250 CWD command successful.'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/roger/.virtualenvs/version30/local/lib/python2.7/site-packages/ftputil/host.py", line 628, in makedirs
    self.mkdir(next_directory)
  File "/home/roger/.virtualenvs/version30/local/lib/python2.7/site-packages/ftputil/host.py", line 608, in mkdir
    self._robust_ftp_command(command, path)
  File "/home/roger/.virtualenvs/version30/local/lib/python2.7/site-packages/ftputil/host.py", line 574, in _robust_ftp_command
    return command(self, tail)
  File "/home/roger/.virtualenvs/version30/local/lib/python2.7/site-packages/ftputil/host.py", line 607, in command
    self._session.mkd(path)
  File "/home/roger/.virtualenvs/version30/local/lib/python2.7/site-packages/ftputil/error.py", line 128, in __exit__
    if exc_value.args and exc_value.args[0].startswith("502"):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 10: ordinal not in range(128)

The error message in pt_br is "Não é possível criar um arquivo já existente."

"""

#76 invalid Error message related to OS schwa ftputiluser
Description
 python test.py 

Traceback (most recent call last):
  File "test.py", line 4, in <module>
    with ftputil.FTPHost('195.0.0.1:595', 'User1', 'test1') as host:
  File "/home/nick/Desktop/ftp_testing_python/ftputil/host.py", line 69, in __init__
    self._session = self._make_session()
  File "/home/nick/Desktop/ftp_testing_python/ftputil/host.py", line 129, in _make_session
    return factory(*args, **kwargs)
  File "/home/nick/Desktop/ftp_testing_python/ftputil/error.py", line 133, in __exit__
    raise FTPOSError(*exc_value.args)
ftputil.error.FTPOSError: -2
Debugging info: ftputil 3.0, Python 2.7.3 (linux2)

The following code worked on a different version of ubuntu

import ftputil 

# Download some files from the login directory.
with ftputil.FTPHost('195.0.0.1:595', 'User1', 'test1') as host:
    names = host.listdir(host.curdir)
    for name in names:
        print(name)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Note: See TracQuery for help on using queries.