stephenmuss / django-ios-notifications

Django iOS Notifications makes it easy to send push notifications to iOS devices
Other
230 stars 72 forks source link

ImportError #74

Closed vladimir-ionita closed 7 years ago

vladimir-ionita commented 8 years ago

Hi! I am using Django 1.9.4 on Python 3.5.1

I've tried both: pip install django-ios-notifications and pip install git+https://github.com/stephenmuss/django-ios-notifications.git#egg=django-ios-notifications

but after the installation I have the following error:

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x105d33378>
Traceback (most recent call last):
  File "/Users/Vlad/Desktop/Back-End/KMinute/django-environment/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/Users/Vlad/Desktop/Back-End/KMinute/django-environment/lib/python3.5/site-packages/django/core/management/commands/runserver.py", line 109, in inner_run
    autoreload.raise_last_exception()
  File "/Users/Vlad/Desktop/Back-End/KMinute/django-environment/lib/python3.5/site-packages/django/utils/autoreload.py", line 249, in raise_last_exception
    six.reraise(*_exception)
  File "/Users/Vlad/Desktop/Back-End/KMinute/django-environment/lib/python3.5/site-packages/django/utils/six.py", line 685, in reraise
    raise value.with_traceback(tb)
  File "/Users/Vlad/Desktop/Back-End/KMinute/django-environment/lib/python3.5/site-packages/django/utils/autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "/Users/Vlad/Desktop/Back-End/KMinute/django-environment/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/Users/Vlad/Desktop/Back-End/KMinute/django-environment/lib/python3.5/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/Users/Vlad/Desktop/Back-End/KMinute/django-environment/lib/python3.5/site-packages/django/apps/config.py", line 202, in import_models
    self.models_module = import_module(models_module_name)
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 662, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/Users/Vlad/Desktop/Back-End/KMinute/django-environment/lib/python3.5/site-packages/ios_notifications/models.py", line 16, in <module>
    from django_fields.fields import EncryptedCharField
  File "/Users/Vlad/Desktop/Back-End/KMinute/django-environment/lib/python3.5/site-packages/django_fields/fields.py", line 11, in <module>
    from django.utils.encoding import smart_str, force_unicode
ImportError: cannot import name 'force_unicode'

What could possibly be wrong?

stephenmuss commented 8 years ago

Hi, django-ios-notifications doesn't yet test against or officially support Python 3.x.

In this case it appears as though the problem is in the third-party dependency Django fields which is attempting an invalid import.