tschellenbach / Django-facebook

Facebook open graph api implementation using the Django web framework in python
http://www.mellowmorning.com/
Other
1.43k stars 543 forks source link

ImportError: No module named 'django.forms.util' #581

Open robertonunezc opened 8 years ago

robertonunezc commented 8 years ago

I followed the docs step by step and when I try to update my models , have this error.

ImportError: No module named 'django.forms.util' And the class definition y django.forms.utils with a S at the end.

I am django 1.9.6

jrabbit commented 8 years ago

can you post the full traceback please

munkhbolde commented 8 years ago

it's fine on the master branch but when i install django_facebook using pip that errors displayed "api.py"

robertonunezc commented 8 years ago

Here all traceback... I have python 3.4, opensuse Leap, python3.4.1

Unhandled exception in thread started by <function check_errors..wrapper at 0x7f3cea50c048> Traceback (most recent call last): File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django/utils/autoreload.py", line 226, in wrapper fn(_args, *_kwargs) File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django/core/management/commands/runserver.py", line 116, in inner_run self.check(display_num_errors=True) File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django/core/management/base.py", line 426, in check include_deployment_checks=include_deployment_checks, File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django/core/checks/registry.py", line 75, in run_checks new_errors = check(app_configs=app_configs) File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django/core/checks/urls.py", line 13, in check_url_config return check_resolver(resolver) File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django/core/checks/urls.py", line 23, in check_resolver for pattern in resolver.url_patterns: File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django/utils/functional.py", line 33, in get res = instance.dict[self.name] = self.func(instance) File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django/core/urlresolvers.py", line 417, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django/utils/functional.py", line 33, in get res = instance.dict[self.name] = self.func(instance) File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django/core/urlresolvers.py", line 410, in urlconf_module return import_module(self.urlconf_name) File "/home/user/Dev/ve/project/lib64/python3.4/importlib/init.py", line 109, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 2254, in _gcd_import File "", line 2237, in _find_and_load File "", line 2226, in _find_and_load_unlocked File "", line 1200, in _load_unlocked File "", line 1129, in _exec File "", line 1471, in exec_module File "", line 321, in _call_with_frames_removed File "/home/user/Dev/appit-web/appit/urls.py", line 34, in (r'^accounts/', include('django_facebook.auth_urls')), File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django/conf/urls/init.py", line 52, in include urlconf_module = import_module(urlconf_module) File "/home/user/Dev/ve/project/lib64/python3.4/importlib/init.py", line 109, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 2254, in _gcd_import File "", line 2237, in _find_and_load File "", line 2226, in _find_and_load_unlocked File "", line 1200, in _load_unlocked File "", line 1129, in _exec File "", line 1471, in exec_module File "", line 321, in _call_with_frames_removed File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django_facebook/auth_urls.py", line 32, in from django_facebook import registration_views File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django_facebook/registration_views.py", line 4, in from django_facebook.connect import CONNECT_ACTIONS File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django_facebook/connect.py", line 10, in from django_facebook.api import get_facebook_graph File "/home/user/Dev/ve/project/lib/python3.4/site-packages/django_facebook/api.py", line 1, in from django.forms.util import ValidationError ImportError: No module named 'django.forms.util'

himani93 commented 8 years ago

I am using Django 1.9.7 and python 2.7.6 on Ubuntu 14.04

Traceback (most recent call last): File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django/utils/autoreload.py", line 226, in wrapper fn(_args, *_kwargs) File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django/core/management/commands/runserver.py", line 116, in inner_run self.check(display_num_errors=True) File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django/core/management/base.py", line 426, in check include_deployment_checks=include_deployment_checks, File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django/core/checks/registry.py", line 75, in run_checks new_errors = check(app_configs=app_configs) File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 13, in check_url_config return check_resolver(resolver) File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django/core/checks/urls.py", line 23, in check_resolver for pattern in resolver.url_patterns: File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django/utils/functional.py", line 33, in get res = instance.dict[self.name] = self.func(instance) File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 417, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django/utils/functional.py", line 33, in get res = instance.dict[self.name] = self.func(instance) File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django/core/urlresolvers.py", line 410, in urlconf_module return import_module(self.urlconf_name) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) File "/home/dishu/dev/talkovercoffee/talkcoffee/talkcoffee/urls.py", line 31, in url(r'^accounts/', include('django_facebook.auth_urls')), File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django/conf/urls/init.py", line 52, in include urlconf_module = import_module(urlconf_module) File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module import(name) File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django_facebook/auth_urls.py", line 32, in from django_facebook import registration_views File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django_facebook/registration_views.py", line 4, in from django_facebook.connect import CONNECT_ACTIONS File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django_facebook/connect.py", line 10, in from django_facebook.api import get_facebook_graph File "/home/dishu/dev/talkovercoffee/local/lib/python2.7/site-packages/django_facebook/api.py", line 1, in from django.forms.util import ValidationError ImportError: No module named util

himani93 commented 8 years ago

The class django.forms.util was renamed django.forms.utils (note the added s) in Django 1.9.

I changed from django.forms.util import ValidationError to from django.forms.utils import ValidationError. After this change it works.

rakanalh commented 8 years ago

Is a fix going to be available anytime soon?

Thanks

innmate commented 7 years ago

What a pain, a wasted hour