-
Notifications
You must be signed in to change notification settings - Fork 74
fix .server_state() attribute name #131
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
Conversation
``` ... socket.set_interface(esp) ss = socket.socket() esp.start_server(PORT, ss.socknum) print("Server status: ", esp.server_state(ss.socknum)) print("Server status: ", esp.get_server_state(ss.socknum)) ``` yields ``` Server status: 1 Traceback (most recent call last): File "code.py", line 76, in <module> AttributeError: 'ESP_SPIcontrol' object has no attribute 'get_server_state' ```
I'm not actively working on WSGIServer, but noticed this when looking at it to make a simple TCP socket server example. |
@anecdata :) could you guide me in how to test this, I have the hardware2 but my |
@jposada202020 There is an example, I've only run it once: Once it's running, any web client can load the web page, the server will print out its IP address, and the port is 80. If you want, here or on Discord, I can set it up in parallel with you and step through it since I'm a little hazy on it now. |
Oh yeah, and in line 232 of the example, you have to turn debug on to exercise the PR change: |
This was tested, and it works as described Adafruit CircuitPython 6.2.0-beta.4 on 2021-03-18; Adafruit PyPortal Titano with samd51j20
>>> import esp32spi_wsgiserver
ESP32 SPI simple web server test!
open this IP in your browser: 192.168.2.68
Server available at 192.168.2.68:80
Sever status: 1 We have a long discussion over the #help-with-circuitpython-channel during our testing, if anyone is interested in this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me as well.
Tested successfully on:
Adafruit CircuitPython 7.1.0-beta.0 on 2021-11-12; Adafruit PyPortal with samd51j20
Board ID:pyportal
Updating https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI to 3.5.13 from 3.5.12: > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#131 from adafruit/anecdata-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_ESP32SPI#145 from dhalbert/make-package > update rtd py version Updating https://github.com/adafruit/Adafruit_CircuitPython_RTTTL to 2.4.9 from 2.4.8: > Merge pull request adafruit/Adafruit_CircuitPython_RTTTL#27 from FoamyGuy/typing_fix > update rtd py version Updating https://github.com/adafruit/Adafruit_CircuitPython_Slideshow to 1.7.2 from 1.7.1: > Merge pull request adafruit/Adafruit_CircuitPython_Slideshow#41 from dhalbert/OnDiskBitmap-filename > update rtd py version
AttributeError: 'ESP_SPIcontrol' object has no attribute 'get_server_state'