Help regarding python facepy library

M

malhar vora

Hello all,

I am using python facepy library to fetch data from facebook. It was running fine. The problem now is I just changed my system and now getting error that says "certificate verify failed". Here my code and exception log both are given below.

The library that I have used is https://pypi.python.org/pypi/facepy

Code is given below.
#################################################################################
import facepy
from facepy import GraphAPI,exceptions
import json

graph = GraphAPI('my fb access token')

fb_dump = open('D:\\Malhar Data\\Projects\\Social Media Web Project\\TestGround\\temp\\Output\\output.txt', 'w')

try:
pages = graph.get('AhmedabadUniversity/posts', page=True)
all_pages = []
for page in pages:
all_pages = all_pages + page["data"]
except exceptions.OAuthError, error:
if error.code == 2:
print "Unexpected error occured"
elif error.code == 803:
print "Alias or Page does not exist"

for d in all_pages:

fb_dump.write("Message : " + d.get('message','None').encode("UTF-8", "ignore"))

fb_dump.close()
##########################################################################

Exception log is given below.

D:\Malhar Data\Projects\Social Media Web Project\TestGround\temp>python fbgrabbe
r.py
C:\Python26\lib\site-packages\facepy\graph_api.py:199: DeprecationWarning: BaseE
xception.message has been deprecated as of Python 2.6
raise HTTPError(exception.message)
Traceback (most recent call last):
File "fbgrabber.py", line 14, in <module>
for page in pages:
File "C:\Python26\Lib\site-packages\facepy\graph_api.py", line 212, in paginat
e
result, url = load(method, url, data)
File "C:\Python26\Lib\site-packages\facepy\graph_api.py", line 199, in load
raise HTTPError(exception.message)
facepy.exceptions.HTTPError: [Errno 1] _ssl.c:480: error:14090086:SSL routines:S
SL3_GET_SERVER_CERTIFICATE:certificate verify failed
============================================================================

I tried generating new token and run the script but got same error.
I didn't find any solution of this problem.
If anybody is able to figure out the problem, please help me.


Thank you,

Malhar Vora
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top