Skip to content

Removing last network fails #5

Description

@brainelectronics

If only one network is configured, removing it will fail with the following report

* Running on http://192.168.4.1:80/
INFO:picoweb:699107456.207 <HTTPRequest object at 3f8425d0> <Stream object at 3f8423c0> "GET /favicon.ico"
INFO:picoweb:699107456.207 <HTTPRequest object at 3f844a70> <Stream object at 3f844860> "GET /configure"
DEBUG:WiFiManager:Existing config content: TP-LINK_FBFC3C
INFO:picoweb:699107456.207 <HTTPRequest object at 3f84c000> <Stream object at 3f84bb60> "GET /bootstrap.min.css"
DEBUG:WiFiManager:gzip accepted for CSS style file
DEBUG:WiFiManager:Accessed file static/css/bootstrap.min.css.gz
INFO:picoweb:699107456.207 <HTTPRequest object at 3f864dd0> <Stream object at 3f864bb0> "GET /favicon.ico"
INFO:picoweb:699107456.207 <HTTPRequest object at 3f869be0> <Stream object at 3f8699b0> "POST /remove_wifi_config"
INFO:WiFiManager:Remove networks: {'NETWORKNAME': 'NETWORKNAME'}
WARN:WiFiManager:Type: <class 'dict'>
DEBUG:WiFiManager:Read encrypted data: b'....'
DEBUG:WiFiManager:Decrypted data str: {'ssid': 'NETWORKNAME', 'password': 'NET_PW'}
DEBUG:WiFiManager:Decrypted data dict: {'ssid': 'NETWORKNAME', 'password': 'NET_PW'}
ERROR:picoweb:699107456.207 <HTTPRequest object at 3f869be0> <Stream object at 3f8699b0> TypeError('string indices must be integers, not str',)
Traceback (most recent call last):
  File "/lib/picoweb/__init__.py", line 206, in _handle
  File "/lib/wifi_manager/wifi_manager.py", line 719, in remove_wifi_config
  File "/lib/wifi_manager/wifi_manager.py", line 592, in _remove_wifi_config
TypeError: string indices must be integers, not str

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions