0

Tweepy で Twitter リストのメンバーのリストを表示しようとしています。django アプリでページにアクセスしようとすると、次のエラーが発生します。しかし、シェル ターミナル (manage.py シェル) で確認しようとすると、リストにメンバーが表示されます。

どうすればこれを解決できますか?

       TweepError at /list/
       [{u'message': u'Sorry, that page does not exist', u'code': 34}]
       Request Method:  GET
       Request URL: http://127.0.0.1:8000/list/
       Django Version:  1.4
       Exception Type:  TweepError
       Exception Value: [{u'message': u'Sorry, that page does not exist', u'code': 34}]
       Exception Location:  build\bdist.win32\egg\tweepy\binder.py in execute, line 168
       Python Executable:   C:\Python27\python.exe
       Python Version:  2.7.3
       Python Path: ['C:\\Python27\\Scripts\\crack',
                     'C:\\Python27\\lib\\site-packages\\django_social_auth-0.6.9-py2.7.egg',
                     'C:\\Python27\\lib\\site-packages\\python_openid-2.2.5-py2.7.egg',
                     'C:\\Python27\\lib\\site-packages\\oauth2-1.5.211-py2.7.egg',
                     'C:\\Python27\\lib\\site-packages\\httplib2-0.7.4-py2.7.egg',
                     'C:\\Python27\\lib\\site-packages\\tweepy-1.9-py2.7.egg',
                     'C:\\Python27\\lib\\site-packages\\django_pagination-1.0.7-py2.7.egg',
                     'C:\\Python27\\lib\\site-packages\\django_imagekit-2.0.1-py2.7.egg',
                     'C:\\Windows\\system32\\python27.zip',
                     'C:\\Python27\\DLLs',
                     'C:\\Python27\\lib',
                     'C:\\Python27\\lib\\plat-win',
                     'C:\\Python27\\lib\\lib-tk',
                     'C:\\Python27\\lib\\site-packages\\PIL']
         Server time:   Wed, 30 May 2012 10:07:07 +0100

ビュー

        def listmem(request):
            Users= api.list_members(owner=request.user, slug='map')
            for User in Users:
                print User
            return render_to_response('listmember.html',{'Users': Users},context_instance=RequestContext(request))

テンプレート

          {% block content %}
             {% for User in Users %} 

                 <p> <img src={{ User.profile_image_url }} /> {{ User.screen_name}}<a>   </p> 
          {% endfor %} 

           {% endblock %}
4

1 に答える 1

1

request.user所有者 ( から取得) とスラッグが正しいと確信していますか?

Twitter の応答は、リソース (この場合はリスト) が見つからないことを示しているため、これらのいずれかが正しくありません。

于 2012-05-30T14:37:11.520 に答える