I'm trying to get the uhttpd demo of https://github.com/fadushin/esp8266/tre ... hon/uhttpd up and running.
I've cross-compiled the modules as descriped in the docs of the project, but after uploading the mpy files to my ESP8266-12F I got stuck with this problem:
Code: Select all
MicroPython v1.17 on 2021-09-02; ESP module with ESP8266
Type "help()" for more information.
>>> import os
>>> os.chdir('www')
>>> f = open('index.html', 'w')
>>> f.write('<html><body>Hello World!</body></html>')
38
>>> f.close()
>>> os.listdir()
['index.html']
>>> import uhttpd
>>> import uhttpd.file_handler
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'uhttpd.file_handler'
>>> server = uhttpd.Server([('/', uhttpd.file_handler.Handler('/www'))])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Server'
>>> import inspect
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'inspect'
>>> dir(uhttp)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'uhttp' isn't defined
>>> dir(uhttpd)
['__class__', '__name__', '__path__']
>>> os.listdir()
['index.html']
>>> os.chdir('/')
>>> os.listdir()
['boot.py', 'uhttpd', 'ulog', 'www']
>>>
Any help appreciated.