home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.3k stars 30.62k forks source link

HA 0.40.1 (docker) Error when using snmp device tracker #6699

Closed cva closed 7 years ago

cva commented 7 years ago

Home Assistant release (hass --version): 0.40.1 (docker image homeassistant/home-assistant)

Python release (python3 --version): Python 3.5.3

Component/platform: device_tracker / snmp

Description of problem: The tracker does not seem to work (crashes during startup).

Expected: Does not crash.

Problem-relevant configuration.yaml entries and steps to reproduce:

device_tracker:
  - platform: snmp
    host: 192.168.7.250
    community: public
    baseoid: 1.3.6.1.4.1.25053.1.2.2.1.1.3.1.1.1.6
  1. Start home assistant
  2. View logs

Traceback (if applicable):

Traceback (most recent call last):
  File "/usr/src/app/homeassistant/components/device_tracker/__init__.py", line 152, in async_setup_platform
    None, platform.get_scanner, hass, {DOMAIN: p_config})
  File "uvloop/future.pyx", line 230, in __iter__ (uvloop/loop.c:110600)
  File "uvloop/future.pyx", line 432, in uvloop.loop.BaseTask._fast_wakeup (uvloop/loop.c:113980)
  File "uvloop/future.pyx", line 101, in uvloop.loop.BaseFuture._result_impl (uvloop/loop.c:108900)
  File "/usr/local/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/device_tracker/snmp.py", line 45, in get_scanner
    scanner = SnmpScanner(config[DOMAIN])
  File "/usr/src/app/homeassistant/components/device_tracker/snmp.py", line 77, in __init__
    data = self.get_snmp_data()
  File "/usr/src/app/homeassistant/components/device_tracker/snmp.py", line 115, in get_snmp_data
    self.auth, self.host, self.baseoid)
  File "/usr/local/lib/python3.5/site-packages/pysnmp/entity/rfc3413/oneliner/cmdgen.py", line 221, in nextCmd
    **kwargs):
  File "/usr/local/lib/python3.5/site-packages/pysnmp/hlapi/asyncore/sync/cmdgen.py", line 355, in nextCmd
    lookupMib=options.get('lookupMib', True)))
  File "/usr/local/lib/python3.5/site-packages/pysnmp/hlapi/asyncore/cmdgen.py", line 352, in nextCmd
    options.get('cbFun'), options.get('cbCtx'))
  File "/usr/local/lib/python3.5/site-packages/pysnmp/entity/rfc3413/cmdgen.py", line 258, in sendVarBinds
    v2c.apiPDU.setVarBinds(reqPDU, varBinds)
  File "/usr/local/lib/python3.5/site-packages/pysnmp/proto/api/v1.py", line 135, in setVarBinds
    varBindList.getComponentByPosition(idx), varBind
  File "/usr/local/lib/python3.5/site-packages/pysnmp/proto/api/v1.py", line 42, in setOIDVal
    varBind.setComponentByPosition(1).getComponentByPosition(1).setComponentByType(val.getTagSet(), val, verifyConstraints=False, matchTags=False, matchConstraints=False, innerFlag=True)
TypeError: setComponentByType() got an unexpected keyword argument 'matchTags'

Additional info:

mezz64 commented 7 years ago

This has been fixed in the latest dev. It was an issue with different versions of the pyasn1 package requirement.

cva commented 7 years ago

yep. built a new container from git and it worked fine.