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

MCP230xx devices throw error on initialization #43

Closed
CrazyIvan359 opened this issue May 10, 2020 · 1 comment
Closed

MCP230xx devices throw error on initialization #43

CrazyIvan359 opened this issue May 10, 2020 · 1 comment
Labels
bug Something isn't working I2C I2C Module

Comments

@CrazyIvan359
Copy link
Owner

Describe the bug

A Type error occurs while initializing MCP230xx devices.

Environment

  • MQTTany version: 0.10.2

Logs

Configuring mcp23017 'Bus 2' at address 0x21 on bus '/dev/i2c-1'
An exception occurred while running function 'init'
Traceback (most recent call last):

  File "/opt/mqttany/mqttany/modules/__init__.py", line 124, in _call_func
    retval = func(**kwargs)

  File "/opt/mqttany/mqttany/modules/i2c/core.py", line 113, in init
    device_config

  File "/opt/mqttany/mqttany/modules/i2c/core.py", line 84, in build_device
    device_config

  File "/opt/mqttany/mqttany/modules/i2c/device/mcp230xx.py", line 539, in __init__
    self._pins = [None] * self._pin_max + 1

TypeError: can only concatenate list (not "int") to list

Module 'i2c' not initialized
@CrazyIvan359 CrazyIvan359 added bug Something isn't working I2C I2C Module labels May 10, 2020
@CrazyIvan359
Copy link
Owner Author

Fixed in v0.10.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I2C I2C Module
Projects
None yet
Development

No branches or pull requests

1 participant