Why can I not connect to my FTP? When I specify a port I receive error "socket.gaierror: [Errno -2] name of service not known", and when I don't specify my port I receive [errno 111] Connection refused. What am I doing wrong?
from ftplib import FTP
from pathlib import Path
file_path = ('TEST.txt')
with FTP('url:port', 'user', 'pass') as ftp,
open(file_path, 'rb') as file:
ftp.storbinary(f'STOR {file_path.name}', file)