Accessing FTP server with Python fails with “getaddrinfo” error

前端 未结 1 1625
慢半拍i
慢半拍i 2021-01-14 03:16

I am trying to access the open DLP Test FTP server as a practice. I keep getting a getaddrinfo error but I am unsure of where I\'m going wrong. I am using Python 2

相关标签:
1条回答
  • 2021-01-14 03:51

    Use

    ftp = FTP('ftp.dlptest.com')
    

    instead.

    The first argument of FTP constructor is host – a hostname or an IP address – not a URL.

    0 讨论(0)
提交回复
热议问题