When I run my Python code, I get the following errors:
File "E:\python343\crawler.py", line 31, in <module>
print (x1)
File "E:\python343\lib\idlelib\PyShell.py", line 1347, in write
return self.shell.write(s, self.tags)
UnicodeEncodeError: 'UCS-2' codec can't encode characters in position 1050-1050: Non-BMP character not supported in Tk
Here is my code:
x = g.request('search', {'q' : 'TaylorSwift', 'type' : 'page', 'limit' : 100})['data'][0]['id']
# GET ALL STATUS POST ON PARTICULAR PAGE(X=PAGE ID)
for x1 in g.get_connections(x, 'feed')['data']:
print (x1)
for x2 in x1:
print (x2)
if(x2[1]=='status'):
x2['message']
How can I fix this?