Doesn't work (was: Re: httplib won't accept URL with parameters (???))

Phillip ritschratsch at gmx.de
Tue Jan 7 17:29:30 EST 2003


pythonhda wrote:

> See the code changes below...

>> file = http.getfile()
>  data = file.read() ####
> http.close()       ####
> return data        ####
>> 
>> CompareServer = ServerGet("www.server.com")
>> ComparePage =
>> 
CompareServer.fetch("""/grab/database/get-page/link=ddb_benutzt_a/00b-97rt
        692-8ab6561?view=fixed-thing&field-stuff-type=used&thing-number=
        3897211920&field-status=open&size=25&rank=+parameter""")
>> # long URL, I know....
>> print ComparePage

Thanks for the help, but:
This still won't work. Here's the same error I get:
>>>>>>
Traceback (most recent call last):
  File "browse.py", line 166, in ?
    MyFetch.compare()
  File "browse.py", line 144, in compare
    DataFetchWrite.write(CompareServer1.fetch(CompareURL))
  File "browse.py", line 47, in fetch
    data = file.read()
AttributeError: 'None' object has no attribute 'read'
<<<<<<

As I said, httplib(!!!) won't return *anything*! Your little addition 
doesn't repair that. ServerGet seems OK, I don't see your point in copying 
the stuff - except form maybe closing the connection.
I just can't figure....any other idea?

--
Phillip




More information about the Python-list mailing list