cwanjau / SMSsync-Python-Django-webservice

This is a sample python/django script to demonstrate how to write a webservice to successfully communicate with SMSSync.
smssync.ushahidi.com
19 stars 19 forks source link

ImportError: cannot import name 'execute_manager' #3

Open nobicycle opened 8 years ago

nobicycle commented 8 years ago

Hello cwanjau,

I run into this error: ImportError: cannot import name 'execute_manager' Which googling informed me has something to do with

_execute_manager deprecated in Django 1.4 as part of the project layout refactor and was removed in 1.6 per the deprecation timeline: https://docs.djangoproject.com/en/1.4/internals/deprecation/#id3

To fix this error you should either install a compatible version of Django for the project or update the manage.py to new style which does not use executemanager: https://docs.djangoproject.com/en/1.4/releases/1.4/#updated-default-project-layout-and-manage-py Most likely if your manage.py is not compatible with 1.6 then neither is the rest of the project. You should find the appropriate Django version for the project.

Best wishes

rodrigopitanga commented 8 years ago

From README:

This webservice has been tested on a computer running Python 2.7.2 and Django 1.3.1

Since then, Django 1.3 (and execute_manager) have been deprecated.

What you can do is create a virtualenv:

virtualenv . source env/bin/activate

and install an older version of django with

pip install Django==1.3

rodrigopitanga commented 8 years ago

@nobicycle I've written a new django-smssync webservice compatible with Python 3 and Django 1.9+. Please see https://github.com/rodrigopitanga/django-smssync

The-macharia commented 4 years ago

Also, check that you create the virtual environment using python2,

virtualenv --python=/usr/bin/python2.7 venv