Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #101594 > unrolled thread
| Started by | "K. Elo" <maillists@pp.inet.fi> |
|---|---|
| First post | 2016-01-13 08:46 +0200 |
| Last post | 2016-01-13 08:46 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
SSL certification fails / tweepy "K. Elo" <maillists@pp.inet.fi> - 2016-01-13 08:46 +0200
| From | "K. Elo" <maillists@pp.inet.fi> |
|---|---|
| Date | 2016-01-13 08:46 +0200 |
| Subject | SSL certification fails / tweepy |
| Message-ID | <mailman.89.1452674969.13488.python-list@python.org> |
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
Back to top | Article view | comp.lang.python
csiph-web