isue when using new FTPlib module
Posted: Tue Apr 10, 2018 5:38 am
Hi,
I am trying out the port of FTPlib to micropython and i seem to have a bit of an issue. I am using a pyboard with a wifi skin and have successfully connected to the local WIFI. I then made use of the following example code from the ftplib.py file:
However i get the following error related to the 'ftp = FTP('ftp.python.org') ' line:
Any ideas what could have gone wrong here - i had a look at the _resolve_addr function but i dont know what i have done wrong.
Any help is much appreciated.
Cheers.
I am trying out the port of FTPlib to micropython and i seem to have a bit of an issue. I am using a pyboard with a wifi skin and have successfully connected to the local WIFI. I then made use of the following example code from the ftplib.py file:
Code: Select all
from ftplib import FTP
ftp = FTP('ftp.python.org') # connect to host, default port
ftp.login() # default, i.e.: user anonymous, passwd anonymous@
ftp.retrlines('LIST') # list directory contents
ftp.quit()
Code: Select all
Traceback (most recent call last):
File "main.py", line 100, in <module>
File "ftplib.py", line 206, in __init__
File "ftplib.py", line 264, in connect
File "ftplib.py", line 226, in _create_connection
File "ftplib.py", line 107, in _resolve_addr
TypeError: function takes 2 positional arguments but 3 were given
MicroPython v1.9.2 on 2017-08-23; PYBv1.1 with STM32F405RG
Type "help()" for more information.
Any ideas what could have gone wrong here - i had a look at the _resolve_addr function but i dont know what i have done wrong.
Any help is much appreciated.
Cheers.