Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
hase-berlin opened this issue Feb 26, 2025 · 0 comments

Comments

@hase-berlin
Copy link

hase-berlin commented Feb 26, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant