Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6344471
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:38:42+00:00 2026-05-24T20:38:42+00:00

I can use the streaming API just fine when I don’t include the count

  • 0

I can use the streaming API just fine when I don’t include the count parameter in filter() call, but when I try to specify how many tweets from my history I want to receive, my stream object returns None.

import tweepy
from tweepy.streaming import StreamListener, Stream

class Listener (StreamListener):
    def on_status(self, status):
        print '-' * 20
        print status.text
        return

def get_tweets(request):
    # if request.is_ajax():
    # All keys and secrets are declared here, but were removed for security reasons.

    auth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
    auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)
    api = tweepy.API(auth)
    listener = Listener()
    stream = Stream(auth, listener)
    stream.filter(follow=("14739093",), count=-5)

I also tried the following, to see what it was returning.

>>> something = stream.filter(follow=("14739093",), count=-5)
>>> print something
None

Thanks for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:38:43+00:00Added an answer on May 24, 2026 at 8:38 pm

    Stream.filter always returns None, its job is just to pass the data on to the StreamListener.

    Your problem is that Twitter only allows the count parameter for certain “roles”.

    Firehose, Links, Birddog and Shadow clients interested in capturing all statuses should maintain a current estimate of the number of statuses received per second and note the time that the last status was received. Upon a reconnect, the client can then estimate the appropriate backlog to request. Note that the count parameter is not allowed elsewhere, including track, sample and on the default access role.

    This is the reason you’re getting a 413 error when you try to use the count parameter — you’re on the “default access” role.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a streaming input which has repeated values. I can use any data
You can use a standard dot notation or a method call in Objective-C to
You can use SelectFolder() to get a folder or GetOpenFolderitem(filter as string) to get
You can use App.config; but it only supports key/value pairs. You can use .Net
I can use FlashWindowEx to make a window flash in the taskbar, but what
You can use XPath if you're binding the XML document in the XAML, but
How would you go to create a streaming API with Node ? just like
I want to use twitter streaming API in my WPF application, I am able
I am trying to use the Streaming API from php, I use the code
I want to use Twitter's Streaming API to collect all of the tweets of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.