thingsboard-python-client-sdk icon indicating copy to clipboard operation
thingsboard-python-client-sdk copied to clipboard

Cannot import TBDeviceMqttClient

Open badril1978 opened this issue 2 years ago • 0 comments

Hi,

I have installed the tb_device_mqtt package on my ubuntu 22.04 running in VMware. It seem to have installed properly. However, when running the following code on jupyter notebook:

'from tb_device_mqtt import TBDeviceMqttClient, TBPublishInfo'

I get the following error:

'ImportError Traceback (most recent call last) Cell In[9], line 1 ----> 1 from tb_device_mqtt import TBPublishInfo

File ~/programs/anaconda3/lib/python3.11/site-packages/tb_device_mqtt.py:27 23 from threading import Thread 25 from simplejson import JSONDecodeError ---> 27 from sdk_utils import verify_checksum 30 FW_TITLE_ATTR = "fw_title" 31 FW_VERSION_ATTR = "fw_version"

File ~/programs/anaconda3/lib/python3.11/site-packages/sdk_utils.py:21 18 import logging 19 from subprocess import CalledProcessError ---> 21 from utils import install_package 23 try: 24 install_package('mmh3')

ImportError: cannot import name 'install_package' from 'utils' (/home/bard/programs/anaconda3/lib/python3.11/site-packages/utils/init.py)'

Am I doing anything wrong here? Any help is much appreciated. Thanks.

badril1978 avatar Oct 18 '23 14:10 badril1978