On Fri, Jun 27, 2008 at 11:02 PM, Hani <[EMAIL PROTECTED]> wrote:
> My questions are:
> 1. can anyone explain the error a little better to me?
> 2. Is it a bug in the python-twitter api, or in django, or in my code?
> 3. Is there a fix that does not involve using the patch?
> 4. If I have to use the patch, could someone provide easy to follow
> steps for me to apply it (absolutely no clue here)?

Question 1 (this is going to gloss over a lot of things, but hopefully
will help):

Basically, on Unix and Unix-like systems, there is a concept of a
"controlling terminal" -- for example, if you're on Mac OS X (which is
BSD-ish Unix under the hood), you can open a Terminal and launch a
Python interpreter; in this case, the instance of Terminal.app you're
using will be the "controlling terminal" of the process the Python
interpreter is running in.

It's often useful to get information about your controlling process,
because this can answer some fairly practical question; in the case of
the Twitter API, it was looking for the username of the logged-in user
who launch the Python process, which is available if, for example, it
was launched directly from a command line. Python's standard 'os'
module allows you to do this sort of thing fairly easily. However,
there are cases where the controlling process doesn't support this
sort of thing, and in those cases the Python functions will raise an
IOError (you can also take some steps to determine in advance whether
your controlling process supports these functions).

Question 2: Yes, it is (or was) a bug in the Twitter module.

Question 3: the ticket you're looking at is a duplicate of one I filed
earlier, and which was marked fixed some time ago:
http://code.google.com/p/python-twitter/issues/detail?id=14

The relevant patch catches the IOError and falls back to a default
value when the necessary information isn't available:
http://code.google.com/p/python-twitter/source/detail?r=113#

So if you do an svn up on your copy of the Twitter module, it should work.


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to