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

[HELP]When I try to use CustomiMqttUplinkConverter,The code 'self. _ configuration. get (' extension-configuration ')' is always None #1426

Closed
CMLiang opened this issue Jun 13, 2024 · 1 comment
Assignees
Labels
bug can be closed If bug fixed or feature is implemented

Comments

@CMLiang
Copy link

CMLiang commented Jun 13, 2024

Describe the issue
When I try to use CustomiMqttUplinkConverter,The code 'self. _ configuration. get (' extension-configuration ')' is always None

Configuration (Attach your configuration file)
Notate: Remove Access token from file if you want to attach a tb_gateway.yaml
mqtt.json

Connector name (If you need help with some connector/converter):
MQTT Custom Converter.Perhaps similar custom converters also have similar issues

Error traceback (If it was raised):

So it always runs until this code=> dict_result["telemetry"] = {"data": int(body, 0)}  # if no specific configuration in config file - just send data which received,And then this code seems to have an issue, it will report an error↓

|ERROR| - [tb_gateway_service.py] - tb_gateway_service - __send_to_storage - 1070 - 'str' object has no attribute 'get'

I am trying to change it to "extensionConfiguration", which is consistent with expectations. Is it due to the Camel Case conversion?
Additionally, in the else code block, I changed it to append to resolve the error of 'str' object has no attribute 'get'

I hope you can see and give me a reply, thank you!

Versions (please complete the following information):

  • OS: Centos 7
  • Thingsboard IoT Gateway version 3.5
  • Python version 3.9
@samson0v
Copy link
Contributor

Hi @CMLiang,

Thank you for your interest in ThingsBoard IoT Gateway, we have updated the custom mqtt converter in extension folder in master branch.

@samson0v samson0v added bug can be closed If bug fixed or feature is implemented and removed help wanted labels Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug can be closed If bug fixed or feature is implemented
Projects
None yet
Development

No branches or pull requests

3 participants