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

send_sms error #1

Open
whitehunter opened this issue Jun 30, 2015 · 0 comments
Open

send_sms error #1

whitehunter opened this issue Jun 30, 2015 · 0 comments

Comments

@whitehunter
Copy link

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']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant