Code

Opened 6 years ago

Closed 6 years ago

#8621 closed (worksforme)

Error in contrib.comments:

Reported by: tback Owned by: nobody
Component: contrib.comments Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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

Attachments (0)

Change History (1)

comment:1 Changed 6 years ago by thejaswi_puthraya

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to worksforme
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.