Opened 16 years ago
Closed 16 years ago
#8621 closed (worksforme)
Error in contrib.comments:
Reported by: | Till Backhaus | Owned by: | nobody |
---|---|---|---|
Component: | contrib.comments | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Caught an exception while rendering: Could not import django.contrib.comments.views.userflags. Error was: cannot import name ModeratorDeletion
Traceback is this:
Original Traceback (most recent call last):
File "/home/xxx/project/trunk/django/template/debug.py", line 71, in render_node
result = node.render(context)
File "/home/xxx/project/trunk/django/template/defaulttags.py", line 365, in render
return reverse(self.view_name, args=args, kwargs=kwargs)
File "/home/xxx/project/trunk/django/core/urlresolvers.py", line 307, in reverse
*args, kwargs)))
File "/home/xxx/project/trunk/django/core/urlresolvers.py", line 289, in reverse
if lookup_view in self.reverse_dict:
File "/home/xxx/project/trunk/django/core/urlresolvers.py", line 225, in _get_reverse_dict
for key, value in pattern.reverse_dict.iteritems():
File "/home/xxx/project/trunk/django/core/urlresolvers.py", line 228, in _get_reverse_dict
self._reverse_dict[pattern.callback] = (pattern,)
File "/home/xxx/project/trunk/django/core/urlresolvers.py", line 188, in _get_callback
raise ViewDoesNotExist, "Could not import %s. Error was: %s" % (mod_name, str(e))
ViewDoesNotExist: Could not import django.contrib.comments.views.userflags. Error was: cannot import name ModeratorDeletion
Looks like you are being bitten by the old pyc files. Just delete all pyc files from the django.contrib.comments directory and it should work. In the new comments framework, there is no userflags.
If the problem still persists, please reopen the ticket with more details on how to reproduce it.