Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: "K. Elo" Newsgroups: comp.lang.python Subject: SSL certification fails / tweepy Date: Wed, 13 Jan 2016 08:46:15 +0200 Lines: 53 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: news.uni-berlin.de XucmWMsJSnUKChamS6KzkQHVEIjG8Qfv2hMFzK4q5+Kw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'else:': 0.03; 'broken': 0.03; 'upgraded': 0.05; 'problem?': 0.07; 'subject:skip:c 10': 0.07; 'api': 0.09; 'python': 0.10; '2.7': 0.13; 'causing': 0.13; 'weird': 0.15; 'advance!': 0.16; 'received:fi': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:SSL': 0.16; 'subject:fails': 0.16; 'true:': 0.16; 'try:': 0.18; 'to:name :python-list@python.org': 0.20; 'help.': 0.23; 'tried': 0.24; 'written': 0.24; 'script': 0.25; 'header:User-Agent:1': 0.26; 'skip:" 20': 0.26; 'skip:u 20': 0.28; 'went': 0.28; '---': 0.28; 'mining': 0.29; 'sleep': 0.29; 'code:': 0.29; 'system,': 0.30; 'error.': 0.31; 'related': 0.32; 'run': 0.33; 'ubuntu': 0.33; 'except': 0.34; 'running': 0.34; 'list': 0.34; 'could': 0.35; 'execution': 0.35; 'i.e.': 0.35; 'library.': 0.35; 'something': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'being': 0.37; 'thanks': 0.37; 'difference': 0.38; 'wrong': 0.38; 'skip:e 20': 0.39; 'to:addr:python.org': 0.40; 'skip:u 10': 0.61; 'yes': 0.62; 'skip:n 10': 0.62; 'received:62': 0.63; 'subject: / ': 0.63; 'minutes': 0.64; 'due': 0.65; 'limit': 0.65; 'dear': 0.67; 'exceed': 0.72; 'verification': 0.72; 'received:130': 0.73; 'exceeded,': 0.84; 'followers': 0.84; 'limit?': 0.84; 'members!': 0.84; 'anymore,': 0.95 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 X-Mailman-Approved-At: Wed, 13 Jan 2016 03:49:28 -0500 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:101594 Dear list members! I have written I small python script for twitter mining utilising the 'tweepy' library. Since a couple of days I cannot use the script anymore, due to a "ssl certificate verification failed" error. The authentication with Twitter API succeess, but when I try to run the following code: --- snip --- api=tweepy.API(auth) # 'auth' is my authentification token print("Receiving network members for '", user_to_track, "' ... ") network_members = [] # # The user wants to get all followers of a twitter user # while True: try: for page in tweepy.Cursor(api.followers_ids, user_to_track).pages(): network_members.extend(page) print("Current follower count: ", len(network_members)) if len(page)==5000: time.sleep(60) break except tweepy.TweepError as e: # Did we exceed the rate limit? if e.message[0]["code"]==88: # Yes -> sleep for 15 minutes and then continue print("Rate limit exceeded, sleeping for 15 minutes ...") time.sleep(15*60) continue else: # Something else went wrong -> break out from the loop! print("Exception: ", e.message[0], " (", e.code[0], ") --> interrupting, sorry!") break --- snip --- the execution is broken with an "ŚSL_VERIFICATION_FAILED" error. I have tried both python 2.7 and 3.x, no difference :( I have also upgraded 'tweepy', no help. I suspect this being somehow related to my current system, i.e. openSuSE Tumbleweed. I tested the script on a ubuntu system and encountered no problems... But I need to get the script running also with my openSuSE :) Any ideas what could be causing this weird problem? Thanks in advance! Kimmo