adafruit / Adafruit_CircuitPython_AdafruitIO

Adafruit IO for CircuitPython
http://io.adafruit.com
MIT License
49 stars 33 forks source link

io.get_feed wrong number of arguments #115

Closed mikeysklar closed 8 months ago

mikeysklar commented 9 months ago

A forum user reported that a simple Pico W AIO example script was failing.

I was able to reproduce the same error using a Pico W loaded with CP 8.2.6 and the current adafruit_io / adafruit_requests library releases.

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
connected to io
Traceback (most recent call last):
  File "code.py", line 33, in <module>
  File "adafruit_io/adafruit_io.py", line 748, in get_feed
  File "adafruit_io/adafruit_io.py", line 578, in _get
  File "adafruit_requests.py", line 732, in get
  File "adafruit_requests.py", line 674, in request
  File "adafruit_requests.py", line 615, in _send_request
  File "adafruit_requests.py", line 560, in _send_header
  File "adafruit_requests.py", line 555, in _send_as_bytes
TypeError: wrong number of arguments

Code done running.

I tried going to CP9.x and rolling back to earlier releases of CP8.x as well as the libraries, but the error persists.

This is the relevant section of the code.py that triggers the problem.

try:
# get feed
    picowTemp_feed = io.get_feed("pitemp")
    picowHumid_feed = io.get_feed("pihumid")
except AdafruitIO_RequestError:
# if no feed exists, create one
    picowTemp_feed = io.create_new_feed("pitemp")
    picowHumid_feed = io.create_new_feed("pihumid")
User-764Q commented 9 months ago

I'm getting exactly the same issue.

Here is what triggers the error. picowTemp_feed = io.get_feed("pitemp")

My errors are below

%Run -c $EDITOR_CONTENT connected to io Traceback (most recent call last): File "", line 33, in File "adafruit_io/adafruit_io.py", line 748, in get_feed File "adafruit_io/adafruit_io.py", line 578, in _get File "adafruit_requests.py", line 732, in get File "adafruit_requests.py", line 674, in request File "adafruit_requests.py", line 615, in _send_request File "adafruit_requests.py", line 560, in _send_header File "adafruit_requests.py", line 555, in _send_as_bytes TypeError: wrong number of arguments

mikeysklar commented 9 months ago

@brentru

brentru commented 9 months ago

Transferred this issue from Adafruit CircuitPython Requests to Adafruit IO CircuitPython

User-764Q commented 8 months ago

Thanks, the merged file fixed my issue :-{)

FoamyGuy commented 8 months ago

resolved by: https://github.com/adafruit/Adafruit_CircuitPython_Requests/pull/152