Skip to content
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

io.get_feed wrong number of arguments #115

Closed
mikeysklar opened this issue Jan 18, 2024 · 5 comments
Closed

io.get_feed wrong number of arguments #115

mikeysklar opened this issue Jan 18, 2024 · 5 comments
Assignees

Comments

@mikeysklar
Copy link

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
Copy link

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
Copy link
Author

@brentru

@brentru brentru self-assigned this Jan 25, 2024
@brentru brentru transferred this issue from adafruit/Adafruit_CircuitPython_Requests Jan 25, 2024
@brentru
Copy link
Member

brentru commented Jan 25, 2024

Transferred this issue from Adafruit CircuitPython Requests to Adafruit IO CircuitPython

@User-764Q
Copy link

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

@FoamyGuy
Copy link
Contributor

FoamyGuy commented Feb 4, 2024

@FoamyGuy FoamyGuy closed this as completed Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants