Skip to content

send_sms error  #1

@whitehunter

Description

@whitehunter

Incoming SMS works fine, but when I try:

from nosmsd.models import send_sms
send_sms('+795272209..', u"Проверка")

I get an error:

Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nosmsd/utils.py", line 30, in send_sms
process(m)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nosmsd/utils.py", line 195, in process
return process_smsd(message)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nosmsd/utils.py", line 160, in process_smsd
from nosmsd.database import Outbox, peewee, OutBoxMultipart
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nosmsd/database.py", line 25, in
class Inbox(BaseModel):
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/nosmsd/database.py", line 57, in Inbox
status = peewee.CharField(db_index=True, max_length=50)
File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/peewee.py", line 896, in init
super(CharField, self).init(_args, *_kwargs)
TypeError: init() got an unexpected keyword argument 'db_index'

gammu-smsdrc
Andrey$ cat /etc/gammu-smsdrc
[gammu]
device = /dev/tty.HUAWEIMobile-Modem
connection = at
synchronizetime = yes

[smsd]
RunOnReceive = /Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 /Users/Andrey/my_django/production/phonebook/manage.py nosmsd_incoming
deliveryreport = sms
deliveryreportdelay = 10
pin = 4976
commtimeout = 10
sendtimeout = 20
service = sql
driver = native_mysql
logfile = smsdlog
user = gammu
password = gammu
database = gammu
ps = localhost
DebugLevel = 255
phoneid = 1
SkipSMSCNumber = +79505198000
deliveryreportdelay = 99999

settyngs.py:

'smsd': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'gammu',
'USER': 'gammu',
'PASSWORD': 'gammu',
'HOST': 'localhost',
'PORT': '3306'
},

DATABASE_ROUTERS = ['nosmsd.django_routers.NoSMSdRouter']

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions