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
  Attribute Error Adit99 5 211 Aug-18-2019, 11:44 AM
Last Post: ichabod801
  AttributeError: 'area' object has no attribute 'areaofcircle' shane1236 5 175 Aug-02-2019, 06:44 AM
Last Post: shane1236
  Object attribute Uchikago 9 490 Jul-07-2019, 10:21 AM
Last Post: Gribouillis
  Error: "Can't set attribute" Norica 8 332 Jun-24-2019, 05:40 PM
Last Post: Norica
  AttributeError: 'NoneType' object has no attribute 'get' ahmeddedo 1 1,209 May-27-2019, 05:57 AM
Last Post: heiner55
  AttributeError: 'tuple' object has no attribute 'interface' Kim6071 1 631 May-26-2019, 07:54 AM
Last Post: heiner55
  how can I write my function output on CSV file go127a 13 474 May-05-2019, 01:55 PM
Last Post: go127a
  AssertionError: View function mapping is overwriting an existing endpoint function Zhavi221 7 1,273 Apr-17-2019, 01:07 PM
Last Post: Zhavi221
  Use the write function manonB 2 273 Apr-17-2019, 05:55 AM
Last Post: manonB
  importing an attribute Skaperen 7 530 Apr-14-2019, 03:54 PM
Last Post: snippsat

Forum Jump:


Users browsing this thread: 1 Guest(s)