betterthan's People
betterthan's Issues
UnicodeDecodeError in edge extraction task
From the celery log:
[2013-08-09 23:31:43,931: ERROR/MainProcess] <Unrepresentable <type 'unicode'>: UnicodeDecodeError('ascii', "\x1b[1;31mCaught ValueError (Ran into a MENTION where it wasn't expected at offset 3) while extracting edge from: RT @40jamescampbell: cheerleading is where it's at!\xf0\x9f\x8e\x80 #betterthan\xf0\x9f\x8f\x88\x1b[0m", 162, 163, 'ordinal not in range(128)')>
Traceback (most recent call last):
File "/home/dvogel/.virtualenvs/betterthan/local/lib/python2.7/site-packages/celery/utils/log.py", line 96, in format
record.msg = str_t(color(safe_str(msg)))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xf0 in position 162: ordinal not in range(128)
Does not parse URLs that contain a trailing anchor.
I am not sure this is a problem. Does twitter even pass through the anchor in the tweet text?
parse_tweet_text should catch LexingError
Stacktrace from celery log:
[2013-08-08 23:30:24,842: ERROR/MainProcess] Task extract-edge[c239b811-3a1c-4423-b2de-0350f3a09712] raised exception: LexingError()
Traceback (most recent call last):
File "/home/dvogel/.virtualenvs/betterthan/local/lib/python2.7/site-packages/celery/task/trace.py", line 233, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/dvogel/.virtualenvs/betterthan/local/lib/python2.7/site-packages/celery/task/trace.py", line 420, in __protected_call__
return self.run(*args, **kwargs)
File "/home/dvogel/devel/betterthan/graphextractor/tasks.py", line 22, in edge_extraction_task
edge = extract_edge_from_tweet_text(tweet.text)
File "/home/dvogel/devel/betterthan/graphextractor/extractor.py", line 20, in extract_edge_from_tweet_text
(parsed_ok, result) = parse_tweet_text(tweet_text)
File "/home/dvogel/devel/betterthan/graphextractor/extractor.py", line 13, in parse_tweet_text
parsed = TweetParser.parse(token_stream)
File "/home/dvogel/.virtualenvs/betterthan/local/lib/python2.7/site-packages/rply/parser.py", line 30, in parse
lookahead = next(tokenizer)
File "/home/dvogel/.virtualenvs/betterthan/local/lib/python2.7/site-packages/rply/lexer.py", line 40, in next
raise LexingError(None, SourcePosition(self.idx, -1, -1))
None
Tweet text: u'Key lime pie!!!! #betterthan\u2026 getting kicked\u2026 AGAIN!'
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.