Skip to content

ReadLines does not give results with urls

3 messages · Luzie U. Wingen, Brian Ripley

#
Hello,

I am using R version 1.8.1 on a linux machine (Suse 8.2.).
I have problems to use readLines() with urls.

This seems to be a problem with our proxy-server. 
Downloading files work with download.file() with wget but not without:
This works!
This does not work!

For readLines() there seems not to be the possibility to use wget.
So I can only read the local pages which are accessible without proxy-server
but not:
This does give the following response after 60 sec:
cannot open the connection
After reading the help pages I checked the http_proxy environmental 
variable, which seems to be OK to me:
http_proxy 
		"http://proxy.mh-hannover.de:8080/"
no_proxy 
    "" 

Setting the options options(download.file.method="wget") helps
for download.file() but not for "readLines().

Does anybody has a further idea, how to manipulate readLines()
so that it uses the proxy-server?

Thank you

Luzie
#
It is not readLines() that does not work but url().  Have you tried
looking at the increased level of output which is available to see why?
It is described under ?download.file and ?option, option "internet.info".

We can't tell from your diagnostics if no_proxy is set but empty or unset.
It does have to be unset and I believe SuSe systems have a habit of having 
it set but empty.
On Mon, 12 Jan 2004, Luzie U. Wingen wrote:

            

  
    
#
OK, that  was the hint I needed:

tcsh> unsetenv no_proxy

did the magic!  Now readLines() works!
The no_proxy variable is empty but present in the normal SuSe system.
Thank you for your help

Luzie
On Mon, Jan 12, 2004 at 05:12:19PM +0000, Prof Brian Ripley wrote: