Skip to content

Docs are misleading for the implementation: class has no domainslist parameter #6

@hase-berlin

Description

@hase-berlin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions