QuuxZebula / python-twitter

Automatically exported from code.google.com/p/python-twitter
Apache License 2.0
0 stars 0 forks source link

OSError in CGI #67

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a new CGI file that uses Python and import twitter
2. Add api = twitter.Api(username='user', password='pass')
3. Load the CGI in your browser

What is the expected output? What do you see instead?
No matter what, the page will throw an Error 500, but the error_log shows: 
OSError [Errno 25] Inappropriate ioctl for device.

Instead it should just show a message saying that it had Premature end of 
script headers.

What version of the product are you using? On what operating system?
I'm using 0.5 on Linux with Python 2.4.4

Please provide any additional information below.
I found that in _GetUsername on line 2096 of the current source, the line 
reads:

    except (IOError, OSError), e:

Now, I'm not a Python coder yet, but that doesn't seem right. I deleted the 
, e to make it

    except (IOError, OSError):

And everything works great now. Again, not sure exactly how this all works 
yet, but there does seem to be some problem with that try except block.

Original issue reported on code.google.com by charlie.lehardy on 27 Apr 2009 at 10:17

GoogleCodeExporter commented 9 years ago
This is the same as issue 16. This is resolved in trunk

Original comment by gertvang...@gmail.com on 4 Jun 2009 at 1:36