When trying to call the userauth_publickey_from file method I pass in the username and the file path to the private key .ppk. However when I run it I get a FileError. I have tried putting the file path in a variable with no change
session = Session()
session.handshake(sock)
session.userauth_publickey_fromfile(user, <path to file>)
error code:
session.userauth_publickey_fromfile(user, priv_key)
File "ssh2\session.pyx", line 175, in ssh2.session.Session.userauth_publickey_fromfile
File "ssh2\utils.pyx", line 127, in ssh2.utils.handle_error_codes
ssh2.exceptions.FileError