Comments (2)
Não tinha pego esse erro quando executei, mas se for no momento que calcula o score-CAP acho que podemos escapar tratando a exceção sem perder muito do valor ali. Apesar que isso influenciaria um pouco na amostra.
Se for na @ do candidato mesmo, daí talvez precisamos fazer um replace lá no início para evitar o uso desses caracteres, melhor perder fidelidade no armazenamento do handle, que perder a conta como um todo...
from twitter-bots.
[braga@localhost botometer]$ python get_followers.py
((33374761, 'cirogomes', 'Ciro Gomes', 307565, 1, 0), (51735736, 'afranioboppre', 'Afr\xc3\xa2nio 5050', 2131, 1, 0), (73745956, 'alvarodias_', 'Alvaro Dias', 349520, 1, 0), (128372940, 'Jair Bolsonaro', None, 0, 1, 0), (354095556, 'Haddad_Fernando', 'Fernando Haddad', 687187, 1, 0), (494268633, 'brunosouzasc', 'Bruno Souza - 40.030', 637, 1, 0), (762402774260875265, 'GuilhermeBoulos', 'Guilherme Boulos 50', 129985, 1, 0))
('cirogomes', 307651)
('afranioboppre', 2131)
('alvarodias_', 349529)
('Jair Bolsonaro', 1483484)
Traceback (most recent call last):
File "get_followers.py", line 50, in
update_politico(target[0], user.followers_count, user.name,user.screen_name)
File "get_followers.py", line 32, in update_politico
cursor.execute(sql)
File "/usr/lib64/python2.7/site-packages/pymysql/cursors.py", line 170, in execute
result = self._query(query)
File "/usr/lib64/python2.7/site-packages/pymysql/cursors.py", line 328, in _query
conn.query(q)
File "/usr/lib64/python2.7/site-packages/pymysql/connections.py", line 516, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/usr/lib64/python2.7/site-packages/pymysql/connections.py", line 727, in _read_query_result
result.read()
File "/usr/lib64/python2.7/site-packages/pymysql/connections.py", line 1066, in read
first_packet = self.connection._read_packet()
File "/usr/lib64/python2.7/site-packages/pymysql/connections.py", line 683, in _read_packet
packet.check_error()
File "/usr/lib64/python2.7/site-packages/pymysql/protocol.py", line 220, in check_error
err.raise_mysql_exception(self._data)
File "/usr/lib64/python2.7/site-packages/pymysql/err.py", line 109, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.InternalError: (1366, u"Incorrect string value: '\xEF\xB8\x8F\xE2\x83\xA3...' for column 'handle' at row 1")
Aconteceu no perfil do JB, parece ser no handle. No Twitter está Jair: Bolsonaro 1ï¸�⃣7ï¸�⃣, termina com a imagem de duas teclas. Tentei trocando por outro candidato usando a imagem do número e o erro repetiu.
from twitter-bots.
Related Issues (3)
- Twitter Rate Limit HOT 1
- Dados da pesquisa HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from twitter-bots.