urllib problem (maybe bugs?)
2huggie at gmail.com
Thu Mar 31 18:02:12 CEST 2005
On Wed, 30 Mar 2005 18:25:56 +0200, Fredrik Lundh
<fredrik at pythonware.com> wrote:
> Timothy Wu wrote:
> > After I've done that it works fine for small SEQ values. Then, when I
> > try to send large amount of data (1.4MB), it fails miserably with
> > AttributeError exception.
> the page states that you should send no more than 4000 proteins. how
> many proteins do you have in your 1.4 megabyte file?
It is exactly 4000 protein. I do it by hand with 4000 on browser and
it works just fine. I am not 100% sure but sending 2000 proteins seems
to break when I ran with urllib.
> > I highly suspect the two problems I have are the result of some bugs
> > in the urllib module. Any suggestions?
> if the urllib module couldn't handle forms, don't you think anyone else
> would have noticed that by now?
I would like to think so. It works for me before with much smaller
inputs on other sites, too. However I can't explain how I had to
intentionally fill in incorrect values into the attribute for it to
work (even for testing sequence of merely 10 /characters long), yet
the browser handles it just fine.
> > File "C:\Python24\lib\urllib.py", line 786, in __init__
> > self.read = self.fp.read
> > AttributeError: 'NoneType' object has no attribute 'read'
It says on the documentation, "If the connection cannot be made, or if
the server returns an error code, the IOError exception is raised."
That's not an expected error.
> my guess is that the server shuts the connection down when you're send
> too much data to it. have you contacted the server administrators? (see
> the bottom of that page).
I'll try to check on this. Thanks. However that
filling-in-incorrect-value-for-an-attribute error is still
More information about the Python-list