Closed exorsyst closed 2 years ago
Looks like a bug in phew
where form data is decoded using the same assumptions as a querystring, except the form data will not be urlencoded so it'll split on the =
and break: https://github.com/pimoroni/phew/blob/29909a52917c621680f262bde0018d5189c6b1c6/phew/server.py#L250
If you want to try and hotfix your board you can connect it to a computer and use Thonny to change phew/phew/server.py
line 34 from:
key, value = parameter.split("=")
to:
key, value = parameter.split("=", 1)
And see if that helps!
This is just an FYI. I've had an issue that may be related to this one. The UI doesn’t like it if your WiFi Access point has a space in the name, and the same for the password. This is true for both of mine.. It’s recording them in the config.py file as a “+” rather than a “ “, so if it was “My Access Point” it gets recorded as “My+Access+Point”. I got round it manually editing the values in the config.py file, and it works fine now.
Any ideas on the above @lowfatcode - this would strike me as an instance of it being URL encoded, rather than not?
key, value = parameter.split("=", 1)
This gives me the same error as in the first example
Whoops, this is caused by a rather dumb bug here: https://github.com/pimoroni/phew/blob/29909a52917c621680f262bde0018d5189c6b1c6/phew/server.py#L16
Note that the result of the replace()
call is not written back into text
so the line has no effect at all.
I'll fix that up and commit the change right away.
When provisioning a Pico Grow from new or via a reset the WIFI password section will fail if an equals sign is used. Shell reports the following and the provisioning process halts.
There is the potential for other characters to cause the same issue but I could only find issue with equals.