DeprecationWarning

C

cerr

Hi There,

I would like to create an scp handle and download a file from a
client. I have following code:
import sys, os, paramiko,time
from attachment import SCPClient

transport = paramiko.Transport((prgIP, 22))

try:
transport.connect(username='root', password=prgPass)
except IOError:
print "Transport connect timed out"
writelog(" Transport connect timed out. \n")
sys.exit()

scp = SCPClient(transport)
writelog("Succesfully created scp transport handle to get P-file
\n")

# Create '/tmp/autokernel' if it does not exist.
if not os.access('./PRGfiles', os.F_OK):
os.mkdir('./PRGfiles')

try:
scp.get("/usr/share/NovaxTSP/P0086_2003.xml","./PRGfiles/
P0086_2003.xml")
writelog("succesfully downloaded P-file \n")
except IOError:
writelog("Downloading P-file failed. \n")

but what i'm getting is this and no file is downloaded...:
/opt/lampp/cgi-bin/attachment.py:243: DeprecationWarning:
BaseException.message has been deprecated as of Python 2.6
chan.send('\x01'+e.message)
09/01/2010 08:53:56 : Downloading P-file failed.

What does that mean and how do i resolve this?

Thank you!
Ron
 
C

Chris Rebert

Hi There,

I would like to create an scp handle and download a file from a
client. I have following code:
but what i'm getting is this and no file is downloaded...:
/opt/lampp/cgi-bin/attachment.py:243: DeprecationWarning:
BaseException.message has been deprecated as of Python 2.6
 chan.send('\x01'+e.message)
09/01/2010 08:53:56 : Downloading P-file failed.

What does that mean and how do i resolve this?

http://stackoverflow.com/questions/1272138/baseexception-message-deprecated-in-python-2-6
As the warning message says, line 243 of
/opt/lampp/cgi-bin/attachment.py is the cause of the warning.

However, that's only a warning (albeit probably about a small part of
some error-raising code), not an error itself, so it's not the cause
of the download failure.
Printing out the IOError encountered would be the first step in
debugging the download failure.

Cheers,
Chris
 
C

cerr

http://stackoverflow.com/questions/1272138/baseexception-message-depr...
As the warning message says, line 243 of
/opt/lampp/cgi-bin/attachment.py is the cause of the warning.

However, that's only a warning (albeit probably about a small part of
some error-raising code), not an error itself, so it's not the cause
of the download failure.
Printing out the IOError encountered would be the first step in
debugging the download failure.

Cheers,
Chris
--http://blog.rebertia.com

Hi Chris,

Thanks for getting back!
I get an "I/O error(2): No such file or directory" error even tho the
file i'm trying to copy at /usr/share/NovaxTSP/P0086_2003.xml is
present, an "ls /usr/share/NovaxTSP/P0086_2003.xml" on the target is
succesful... :( What am i doing wrong?
Thanks,
Ron
 
C

Chris Rebert

Hi Chris,

Thanks for getting back!
I get an "I/O error(2): No such file or directory" error even tho the
file i'm trying to copy at /usr/share/NovaxTSP/P0086_2003.xml is
present, an "ls /usr/share/NovaxTSP/P0086_2003.xml" on the target is
succesful... :( What am i doing wrong?

Asking on the Paramiko mailinglist might be more fruitful:
http://www.lag.net/mailman/listinfo/paramiko

Cheers,
Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,998
Messages
2,570,242
Members
46,835
Latest member
lila30

Latest Threads

Top