Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
'function' object has no attribute 'write' paramiko
#1
hello
I want to write in a distant file with sftp.write
my code
write=paramiko.SFTPFile.write
sftp=paramiko.SFTPFile.write
sftp.write(data=hello)
but a error occult
Error:
AttributeError: 'function' object has no attribute 'write'
I have try with the _ but still dosen't work.
thank for the help
Quote
#2
Call a function with parenthases.

Quote:
sftp=paramiko.SFTPFile.write
That doesn't write anything, it just creates a reference to the write function, which is almost definitely not what you meant to do.
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  Why Can't I call base class function for my derived class object? AmirAB 2 71 Feb-13-2019, 03:04 PM
Last Post: snippsat
  AttributeError: 'NoneType' object has no attribute 'get' ahmeddedo 0 79 Feb-13-2019, 02:14 AM
Last Post: ahmeddedo
  AttributeError: 'Ball' object has no attribute 'hit_paddle' meza1123 1 125 Jan-30-2019, 07:25 PM
Last Post: buran
  'str' object has no attribute 'getfo' (Paramiko) lateublegende 2 127 Jan-23-2019, 03:28 PM
Last Post: lateublegende
  AttributeError: 'int' object has no attribute 'reindex' vladponcea 3 131 Jan-19-2019, 03:07 PM
Last Post: ichabod801
  paramiko.ed25519key cverm 9 312 Dec-07-2018, 03:59 PM
Last Post: nilamo
  Class object instance. Link instance attribute to class. Can it be done easier. Windspar 7 249 Dec-03-2018, 11:16 PM
Last Post: Windspar
  AttributeError: 'tuple' object has no attribute 'interface' Kim6071 0 221 Nov-18-2018, 03:06 PM
Last Post: Kim6071
  Please help me error "AttributeError: 'module' object has no attribute 'ElementTree'" mattroi261192 4 333 Nov-11-2018, 05:01 AM
Last Post: mattroi261192
  Error ' Attribute error: 'str' object has no attribute 'items'' in pyinstaller manhnt 2 782 Nov-04-2018, 05:51 PM
Last Post: Larz60+

Forum Jump:


Users browsing this thread: 1 Guest(s)