When following the instructions in the docs(on MicroPython v1.24.1 on 2024-11-29; Raspberry Pi Pico W with RP2040) in my case), the class can not be initialized.
The error is
Traceback (most recent call last):
File "<stdin>", line 8, in <module>
TypeError: function takes 1 positional arguments but 2 were given
which makes sense: the Class starts with
class MicroDNSSrv :
so __init__ gets only one parameter (self) and not the domainslist.
When using the class as follows, it does initialize
from microDNSSrv import MicroDNSSrv
mds = MicroDNSSrv()
mds.SetDomainsList({ '*' : '192.168.0.254' })
mds.Start()
I am posting this for people who stumble across this issue and are tempted to migrate to phew or suchlike.
When following the instructions in the docs(on MicroPython v1.24.1 on 2024-11-29; Raspberry Pi Pico W with RP2040) in my case), the class can not be initialized.
The error is
which makes sense: the Class starts with
class MicroDNSSrv :
so
__init__gets only one parameter (self) and not the domainslist.When using the class as follows, it does initialize
I am posting this for people who stumble across this issue and are tempted to migrate to phew or suchlike.