Git Product home page Git Product logo

sms2mqtt's People

Contributors

dependabot[bot] avatar domochip avatar molpie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

sms2mqtt's Issues

"IndexError: list index out of range when receiving SMS with sms2mqtt"

Environment

  • sms2mqtt version: 1.4.6
  • Gammu version: 1.41.0
  • Python-gammu version: 3.2
  • Device: Qualcomm, Inc. Siemens SG75
  • Docker-compose configuration:
sms2mqtt:  
    container_name: sms2mqtt  
    image: domochip/sms2mqtt  
    devices:  
    - /dev/serial/by-id/usb-Qualcomm__Incorporated_Qualcomm_CDMA_Technologies_MSM_864319031594962-if01-port0:/dev/mobile  
    environment:  
    - PIN=1234  
    - HOST=172.0.0.1  
    - PORT=1883  
    - PREFIX=sms2mqtt  
    - CLIENTID=sms2mqttclid  
    - USER=USER_mqtt  
    - PASSWORD=MDP  

Description

Hello, i encountered an "IndexError: list index out of range" error while running sms2mqtt. The error seems to be related to the following line in sms2mqtt.py

message = {"datetime":str(sms[0]['DateTime']), "number":sms[0]['Number'], "text":decodedsms['Entries'][0]['Buffer']}  

The script was working without any issues for several weeks, but suddenly stopped working.

I can still send SMS using Gammu with the following command:

gammu sendsms TEXT 0600000000 -text "Ceci est un test"  

I have also tried different environment variables in my docker-compose configuration, but the problem persists.

sms2mqtt    | 19:13:49: ===== sms2mqtt v1.4.6 =====  
sms2mqtt    | 19:13:53: Gammu runtime: v1.41.0  
sms2mqtt    | 19:13:53: Python-gammu runtime: v3.2  
sms2mqtt    | 19:13:53: Manufacturer: Qualcomm  
sms2mqtt    | 19:13:53: IMEI: **HIDE**
sms2mqtt    | 19:13:53: SIMIMSI: +**HIDE**  
sms2mqtt    | 19:13:53: Gammu initialized  
sms2mqtt    | Traceback (most recent call last):  
sms2mqtt    |   File "/app/sms2mqtt.py", line 265, in <module>  
sms2mqtt    |     loop_sms_receive()  
sms2mqtt    |   File "/app/sms2mqtt.py", line 116, in loop_sms_receive  
sms2mqtt    |     message = {"datetime":str(sms[0]['DateTime']), "number":sms[0]['Number'], "text":decodedsms['Entries'][0]['Buffer']}  
sms2mqtt    | IndexError: list index out of range  
sms2mqtt exited with code 1  

Any idea ? :)

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.