Python Forum
'function' object has no attribute 'write' paramiko
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
Reply
#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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  AttributeError: 'DataFrame' object has no attribute 'Articles' Anldra12 5 674 Jun-17-2021, 04:54 PM
Last Post: Larz60+
  AttributeError: 'Node' object has no attribute 'insert' Anldra12 4 663 May-11-2021, 10:12 AM
Last Post: Anldra12
  AttributeError: 'tuple' object has no attribute 'format' Anldra12 7 2,990 Apr-13-2021, 07:45 AM
Last Post: Anldra12
  how to call an object in another function in Maya bstout 0 276 Apr-05-2021, 07:12 PM
Last Post: bstout
Lightbulb 'str' object has no attribute 'to_csv' brunolelli 3 2,010 Mar-25-2021, 06:40 AM
Last Post: ndc85430
  AttributeError: 'Message' object has no attribute 'split' helpme1 2 909 Mar-14-2021, 11:25 AM
Last Post: helpme1
  How can I write a function with three parameters? MehmetAliKarabulut 1 561 Mar-04-2021, 10:47 PM
Last Post: Larz60+
  AttributeError class object has no attribute list object scttfnch 5 655 Feb-24-2021, 10:03 PM
Last Post: scttfnch
  AttributeError: 'NoneType' object has no attribute 'next' loves 2 1,837 Dec-15-2020, 11:30 PM
Last Post: bowlofred
  How to Locate an Attribute's Parent Object? calvinsomething 5 706 Nov-13-2020, 01:52 AM
Last Post: calvinsomething

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020