AttributeError: объект 'unicode' не имеет атрибута 'create_connection' в push-уведомлении Django
В своем проекте я использую django-push-уведомления для отправки push-уведомлений на мобильные устройства. Но я получаю следующую ошибку.
[2018-02-22 13:41:20,881: ERROR/ForkPoolWorker-1] Task ballogyApi.tasks.notification_tasks.send_notification_task[e6a5984a-d3b9-4570-a24e-be61702ca4e5] raised unexpected: AttributeError("'unicode' object has no attribute 'create_connection'",)
Traceback (most recent call last):
File "/home/hassan/venv/ballogy/local/lib/python2.7/site-packages/celery/app/trace.py", line 374, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/hassan/venv/ballogy/local/lib/python2.7/site-packages/celery/app/trace.py", line 629, in __protected_call__
return self.run(*args, **kwargs)
File "/home/hassan/Project/ballogy/ballogyApi/tasks/notification_tasks.py", line 41, in send_notification_task
data=data
File "/home/hassan/Project/ballogy/ballogyApi/tasks/notification_tasks.py", line 16, in send_notification
android_response_function, ios_response_function, bulk, **data)
File "/home/hassan/Project/ballogy/ballogyApi/utils/notification_utils.py", line 37, in perform_notification_process
to_user, android_response_function, ios_response_function, bulk, **kwargs)
File "/home/hassan/Project/ballogy/ballogyApi/utils/notification_utils.py", line 47, in send_notification_to_user
to_user, android_response_function, ios_response_function, *args, **kwargs)
File "/home/hassan/Project/ballogy/ballogyApi/utils/notification_utils.py", line 90, in send_single_notification
badge=not_count + total_requests)
File "/home/hassan/venv/ballogy/local/lib/python2.7/site-packages/push_notifications/models.py", line 167, in send_message
**kwargs
File "/home/hassan/venv/ballogy/local/lib/python2.7/site-packages/push_notifications/apns.py", line 113, in apns_send_message
certfile=certfile, **kwargs
File "/home/hassan/venv/ballogy/local/lib/python2.7/site-packages/push_notifications/apns.py", line 66, in _apns_send
client = _apns_create_socket(certfile=certfile, application_id=application_id)
File "/home/hassan/venv/ballogy/local/lib/python2.7/site-packages/push_notifications/apns.py", line 38, in _apns_create_socket
use_alternative_port=get_manager().get_apns_use_alternative_port(application_id)
File "/home/hassan/venv/ballogy/local/lib/python2.7/site-packages/apns2/client.py", line 39, in __init__
self._init_connection(use_sandbox, use_alternative_port, proto)
File "/home/hassan/venv/ballogy/local/lib/python2.7/site-packages/apns2/client.py", line 48, in _init_connection
self._connection = self.__credentials.create_connection(server, port,
AttributeError: 'unicode' object has no attribute 'create_connection'
Добрый день, помогите мне решить эту проблему.