joshvillbrandt / GoProController

An http API to control multiple GoPro cameras over wifi.
Apache License 2.0
190 stars 43 forks source link

Cannot access the API #11

Open alrostami opened 7 years ago

alrostami commented 7 years ago

It seems that something is wrong with django. Here is the error I get:

`Environment:

Request Method: GET Request URL: http://localhost:8000/

Django Version: 1.7.1 Python Version: 2.7.9 Installed Applications: ('django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'corsheaders', 'GoProController') Installed Middleware: ('corsheaders.middleware.CorsMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware')

Traceback: File "/usr/local/lib/python2.7/dist-packages/Django-1.7.1-py2.7.egg/django/core/handlers/base.py" in get_response

  1. resolver_match = resolver.resolve(request.path_info) File "/usr/local/lib/python2.7/dist-packages/Django-1.7.1-py2.7.egg/django/core/urlresolvers.py" in resolve
  2. for pattern in self.url_patterns: File "/usr/local/lib/python2.7/dist-packages/Django-1.7.1-py2.7.egg/django/core/urlresolvers.py" in url_patterns
  3. patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/usr/local/lib/python2.7/dist-packages/Django-1.7.1-py2.7.egg/django/core/urlresolvers.py" in urlconf_module
  4. self._urlconf_module = import_module(self.urlconf_name) File "/usr/lib/python2.7/importlib/init.py" in import_module
  5. import(name) File "/home/pi/GoProController/GoProController/urls.py" in
  6. from rest_framework import serializers, viewsets, routers, filters File "/usr/local/lib/python2.7/dist-packages/djangorestframework-3.5.4-py2.7.egg/rest_framework/serializers.py" in
  7. from django.db.models import DurationField as ModelDurationField

Exception Type: ImportError at / Exception Value: cannot import name DurationField `

johngroves commented 7 years ago

You will need to upgrade to Django >= 1.8; the DurationField was added in that version.