From dbd862d8eca8809468211369a724383603ae2d1a Mon Sep 17 00:00:00 2001 From: Harmon Date: Sat, 23 Oct 2021 11:43:30 -0500 Subject: [PATCH] Add FAQ section on positional arguments for API methods in v4 --- docs/faq.rst | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/faq.rst b/docs/faq.rst index 5c89a2a..dd904c3 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -59,6 +59,20 @@ See Twitter's documentation on the standard search API for more information: https://developer.twitter.com/en/docs/twitter-api/v1/tweets/search/overview https://developer.twitter.com/en/docs/twitter-api/v1/tweets/search/api-reference/get-search-tweets +Tweepy v4 +========= + +Why am I getting a :class:`TypeError` about an :class:`API` method taking 1 positional argument but given 2? +------------------------------------------------------------------------------------------------------------ + +This and other similar errors are due to Tweepy v4.0.0 changing +:class:`API` methods to no longer accept arbitrary positional arguments. +The 1 positional argument being referred to in the error is ``self``. + +These parameters can be passed as keyword arguments instead. + +Refer to the documentation for the :class:`API` method being used. + Twitter API v2 ============== -- 2.25.1