tweetyPy, upon polling Twitter's "friends_timeline", returns a Unicode error.

Bug #130896 reported by muraii
2
Affects Status Importance Assigned to Milestone
tweetyPy
Confirmed
Medium
Stuart Colville

Bug Description

Here’s the error I’m getting:

Traceback (most recent call last):
File “/home/muraii/utilities/tweetyPy”, line 234, in ?
main(sys.argv[1:])
File “/home/muraii/utilities/tweetyPy”, line 228, in main
print result
UnicodeEncodeError: ‘latin-1′ codec can’t encode character u’\u2014′ in position 883: ordinal not in range(256)

Actually, this is a bit different, as it previously was in position 1014. I wager someone used an em-dash in their tweet, and the position change is due to new tweets pushing that offending character around.

Revision history for this message
Stuart Colville (muffinresearch) wrote :

Give this branch a try - I've added a piece of code to make sure all entities are properly converted to unicode strings and hopefully this will resolve the problem. You can grab this branch from here: https://code.edge.launchpad.net/~muffinresearch/tweetypy/trunk

Changed in tweetypy:
assignee: nobody → muffinresearch
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Stuart Colville (muffinresearch) wrote :
Revision history for this message
muraii (muraii) wrote : Re: [Bug 130896] Re: tweetyPy, upon polling Twitter's "friends_timeline", returns a Unicode error.

Hi, Stuart,
--- Stuart Colville <email address hidden> wrote:

> Update that link should be:
>
https://code.launchpad.net/~muffinresearch/tweetypy/trunk

Checking it now. Thanks for following up about this;
I've been trying to ditch GUIs as much as possible, so
this would be a nice addition to mutt and lynx.

Cheers,

Daniel
> --
> tweetyPy, upon polling Twitter's "friends_timeline",
> returns a Unicode error.
> https://bugs.launchpad.net/bugs/130896
> You received this bug notification because you are a
> direct subscriber
> of the bug.
>

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

Revision history for this message
muraii (muraii) wrote :

Hi again, Stuart,

I just downloaded the most recent trunk, and I get nearly precisely the same error for the friends timeline.

"Traceback (most recent call last):
File “/home/muraii/bin/tweetyPy”, line 248, in ?
main(sys.argv[2:],sys.argv[1])
File “/home/muraii/bin/tweetyPy”, line 227, in main
print result
UnicodeEncodeError: ‘latin-1′ codec can’t encode character u’\u2014′ in position 341: ordinal not in range(256)"

I receive the substantively the same error when polling the public timeline, though it's not a specific Unicode character, and is actually a range of character positions.

Is this something you've come up against, or is this an problem solely on my end?

Thank you,

Daniel

Revision history for this message
Stuart Colville (muffinresearch) wrote :

Ok no probs, thanks for the additional info.

I've just moved house and have no internet at present but as soon as I can I'll take a look.

Also note that I am currently re-writing the app to provide interactive CLI and lots of other more useful features. If you have any features you'd like to see added let me know. Although having the app working is certainly top of the list.

Revision history for this message
muraii (muraii) wrote :

Hi, Stuart,

Putting stuff in bug trackers makes me feel like I'm
looking a gift horse in the mouth, which is to say,
I'm appreciative that someone's working on something
like this anyway. I'm not sure it isn't something on
my end; I'm not quite wiley but not too neophytic, but
it's entirely possible that I need some Unicode
thingies on my machine.

Further, I've been trying to set aside time to pick up
some Python. I'm not a coder, but am familiar enough
with the general heuristics and structures of
programming to be a little dangerous. If there's
anything an incompetent wannabe can do to help, let me
know. I'm trying a few things, and have settled on
mcabber (Jabber CLI client) hooked to GTalk, and
Twitter piped through GTalk IM. TweetyPy stands to
fit much better.

Thanks again.

Daniel

--- Stuart Colville <email address hidden> wrote:

> Ok no probs, thanks for the additional info.
>
> I've just moved house and have no internet at
> present but as soon as I
> can I'll take a look.
>
> Also note that I am currently re-writing the app to
> provide interactive
> CLI and lots of other more useful features. If you
> have any features
> you'd like to see added let me know. Although having
> the app working is
> certainly top of the list.
>
> --
> tweetyPy, upon polling Twitter's "friends_timeline",
> returns a Unicode error.
> https://bugs.launchpad.net/bugs/130896
> You received this bug notification because you are a
> direct subscriber
> of the bug.
>

      ____________________________________________________________________________________
Never miss a thing. Make Yahoo your home page.
http://www.yahoo.com/r/hs

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.