Skip to content

Fix TypeError on recv #9

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

Merged
merged 2 commits into from
Mar 12, 2020
Merged

Fix TypeError on recv #9

merged 2 commits into from
Mar 12, 2020

Conversation

brentru
Copy link
Member

@brentru brentru commented Mar 12, 2020

  • Fixes TypeError message thrown by recv() reading a specific amount of bytes, useful for applications which require socket to receive a specific amount of bytes (protocol implementations, like MQTT):

from (typeerror):

Traceback (most recent call last):
  File "code.py", line 74, in <module>
  File "/lib/adafruit_minimqtt.py", line 304, in connect
  File "/lib/adafruit_minimqtt.py", line 621, in _wait_for_msg
  File "/lib/adafruit_wiznet5k/adafruit_wiznet5k_socket.py", line 210, in recv
TypeError: join expects a list of str/bytes objects consistent with self object

to:

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Connecting to Adafruit IO...
Connected to Adafruit IO! Listening for topic changes on brubell/feeds/onoff
Sending photocell value: 0...
  • Sets socket timeout to a default timeout

@brentru brentru requested a review from a team March 12, 2020 17:34
@brentru brentru merged commit e41dccf into adafruit:master Mar 12, 2020
adafruit-adabot added a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Mar 13, 2020
Updating https://github.com/adafruit/Adafruit_CircuitPython_Thermal_Printer to 1.1.5 from 1.1.4:
  > Merge pull request adafruit/Adafruit_CircuitPython_Thermal_Printer#13 from fgallaire/master
  > update pylintrc for black
  > build.yml: move pylint, black, and Sphinx installs to each repo; add description to 'actions-ci/install.sh'

Updating https://github.com/adafruit/Adafruit_CircuitPython_Wiznet5k to 1.2.0 from 1.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#10 from brentru/unpretty-ip
  > Merge pull request adafruit/Adafruit_CircuitPython_Wiznet5k#9 from brentru/fix-socket

Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE_BroadcastNet to 0.8.1 from 0.8.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_BroadcastNet#4 from sommersoft/build_yml_local_pip
  > Merge pull request adafruit/Adafruit_CircuitPython_BLE_BroadcastNet#3 from tannewt/update_doc
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

Successfully merging this pull request may close these issues.

2 participants