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
  AttributeError: 'area' object has no attribute 'areaofcircle' shane1236 5 233 Aug-02-2019, 06:44 AM
Last Post: shane1236
  Object attribute Uchikago 9 545 Jul-07-2019, 10:21 AM
Last Post: Gribouillis
  AttributeError: 'NoneType' object has no attribute 'get' ahmeddedo 1 1,517 May-27-2019, 05:57 AM
Last Post: heiner55
  AttributeError: 'tuple' object has no attribute 'interface' Kim6071 1 686 May-26-2019, 07:54 AM
Last Post: heiner55
  how can I write my function output on CSV file go127a 13 526 May-05-2019, 01:55 PM
Last Post: go127a
  Use the write function manonB 2 296 Apr-17-2019, 05:55 AM
Last Post: manonB
  Help trying to write a function Rochense 3 307 Apr-12-2019, 02:34 PM
Last Post: Gribouillis
  Error 'object has no attribute' when iterating thru a dictionary mrapple2020 8 542 Apr-08-2019, 01:36 AM
Last Post: mrapple2020
  AttributeError: 'ec2.ServiceResource' object has no attribute 'describe_instances' bluethundr 1 1,001 Feb-27-2019, 08:10 PM
Last Post: bluethundr
  AttributeError: 'Ball' object has no attribute 'hit_paddle' meza1123 1 470 Jan-30-2019, 07:25 PM
Last Post: buran

Forum Jump:


Users browsing this thread: 1 Guest(s)