Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in notices feed #45

Open
rtnpro opened this issue Dec 13, 2011 · 1 comment
Open

Bug in notices feed #45

rtnpro opened this issue Dec 13, 2011 · 1 comment

Comments

@rtnpro
Copy link

rtnpro commented Dec 13, 2011

Hi,

I am getting the following traceback when I am trying to access notices feeds page:
Traceback:
File "/home/rtnpro/.virtualenvs/test/lib/python2.7/site-packages/Django-1.3.1-py2.7.egg/django/core/handlers/base.py" in get_response

  1.                     response = callback(request, _callback_args, *_callback_kwargs)
    
    File "/home/rtnpro/.virtualenvs/test/lib/python2.7/site-packages/django_notification-0.1.5-py2.7.egg/notification/decorators.py" in basic_auth
  2.             return view_func(request, _args, *_kwargs)
    
    File "/home/rtnpro/.virtualenvs/test/lib/python2.7/site-packages/django_notification-0.1.5-py2.7.egg/notification/views.py" in feed_for_user
  3.     "feed": NoticeUserFeed,
    
    File "/home/rtnpro/.virtualenvs/test/lib/python2.7/site-packages/Django-1.3.1-py2.7.egg/django/contrib/syndication/views.py" in feed
  4.     instance = f()
    

Exception Type: TypeError at /notices/feed/
Exception Value: init() takes exactly 3 arguments (1 given)

A more detailed traceback can be found at http://pastebin.com/AyRdQRWD. Is this really a bug?

Thanks

@jantoniomartin
Copy link

I think it is. Line 214 in initializes an instance of notification.feeds.NoticeUserFeed, which inherits from notification.feeds.BaseNoticeFeed, and this from notification.atomformat.Feed. The new instance is created without arguments.

instance = f() # f is really NoticeUserFeed

The class Feed in atomformat.py is expecting three arguments (which, in fact, are not used):

def __init__(self, slug, feed_url):
    # @@@ slug and feed_url are not used yet
    pass

I think that a solution could be replacing this init with this:

def __init__(self, slug="", feed_url=""):

or maybe passing two parameters in f().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants