Hi Mitesh,

http://www.sagemath.org//spkg is accessible from my firefox browser.
For the rest of your queries the outputs are:

sage: import urlib
urllib   urllib2
sage: import urllib
sage: urllib.urlretrieve('http://www.sagemath.org//spkg', 'test.html')
---------------------------------------------------------------------------
IOError                                   Traceback (most recent call
last)

/home/samrat/Desktop/<ipython console> in <module>()

/usr/local/pkgs/sage_4/local/lib/python/urllib.pyc in urlretrieve(url,
filename, reporthook, data)
     92     if not _urlopener:
     93         _urlopener = FancyURLopener()
---> 94     return _urlopener.retrieve(url, filename, reporthook,
data)
     95 def urlcleanup():
     96     if _urlopener:

/usr/local/pkgs/sage_4/local/lib/python/urllib.pyc in retrieve(self,
url, filename, reporthook, data)
    236             except IOError, msg:
    237                 pass
--> 238         fp = self.open(url, data)
    239         try:
    240             headers = fp.info()

/usr/local/pkgs/sage_4/local/lib/python/urllib.pyc in open(self,
fullurl, data)
    204         try:
    205             if data is None:
--> 206                 return getattr(self, name)(url)
    207             else:
    208                 return getattr(self, name)(url, data)

/usr/local/pkgs/sage_4/local/lib/python/urllib.pyc in open_http(self,
url, data)
    343         if realhost: h.putheader('Host', realhost)
    344         for args in self.addheaders: h.putheader(*args)
--> 345         h.endheaders()
    346         if data is not None:
    347             h.send(data)

/usr/local/pkgs/sage_4/local/lib/python/httplib.pyc in
endheaders(self)
    890             raise CannotSendHeader()
    891
--> 892         self._send_output()
    893
    894     def request(self, method, url, body=None, headers={}):

/usr/local/pkgs/sage_4/local/lib/python/httplib.pyc in
_send_output(self)
    762         msg = "\r\n".join(self._buffer)
    763         del self._buffer[:]
--> 764         self.send(msg)
    765
    766     def putrequest(self, method, url, skip_host=0,
skip_accept_encoding=0):

/usr/local/pkgs/sage_4/local/lib/python/httplib.pyc in send(self, str)
    721         if self.sock is None:
    722             if self.auto_open:
--> 723                 self.connect()
    724             else:
    725                 raise NotConnected()

/usr/local/pkgs/sage_4/local/lib/python/httplib.pyc in connect(self)
    702         """Connect to the host and port specified in
__init__."""
    703         self.sock =
socket.create_connection((self.host,self.port),
--> 704                                              self.timeout)
    705
    706         if self._tunnel_host:

/usr/local/pkgs/sage_4/local/lib/python/socket.pyc in
create_connection(address, timeout)
    512         except error, msg:
    513             if sock is not None:
    514                 sock.close()
    515
--> 516     raise error, msg

IOError: [Errno socket error] [Errno 110] Connection timed out

On Sep 13, 2:02 am, Mitesh Patel <qed...@gmail.com> wrote:
> On 09/12/2010 07:52 AM, samrat wrote:
>
>
>
> > I installed 4.5.2 from source but i am unable to upgrade from 4.5.2 to
> > 4.5.3 using sage -upgrade.
>
> > i am using CentOS 5.5 with SELinux in permissive mode. I get the
> > errors:
>
> > [r...@localhost Desktop]# sage -upgrade
> > Downloading packages fromhttp://www.sagemath.org//spkg
> > Reading package lists...
> > Traceback (most recent call last):
> >   File "/usr/local/pkgs/sage_4/local/bin/sage-update", line 357, in
> > <module>
> >     do_update()
> >   File "/usr/local/pkgs/sage_4/local/bin/sage-update", line 266, in
> > do_update
> >     packages = spkg_list('standard')
> >   File "/usr/local/pkgs/sage_4/local/bin/sage-update", line 202, in
> > spkg_list
> >     urllib.urlretrieve(web_url, file, reporthook)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/urllib.py", line 94,
> > in urlretrieve
> >     return _urlopener.retrieve(url, filename, reporthook, data)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/urllib.py", line 238,
> > in retrieve
> >     fp = self.open(url, data)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/urllib.py", line 206,
> > in open
> >     return getattr(self, name)(url)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/urllib.py", line 345,
> > in open_http
> >     h.endheaders()
> >   File "/usr/local/pkgs/sage_4/local/lib/python/httplib.py", line 892,
> > in endheaders
> >     self._send_output()
> >   File "/usr/local/pkgs/sage_4/local/lib/python/httplib.py", line 764,
> > in _send_output
> >     self.send(msg)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/httplib.py", line 723,
> > in send
> >     self.connect()
> >   File "/usr/local/pkgs/sage_4/local/lib/python/httplib.py", line 704,
> > in connect
> >     self.timeout)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/socket.py", line 516,
> > in create_connection
> >     raise error, msg
> > IOError: [Errno socket error] timed out
> > Error getting new packages!
> > Double checking that all packages have been installed.
> > Downloading packages fromhttp://www.sagemath.org//spkg
> > Reading package lists...
> > Traceback (most recent call last):
> >   File "/usr/local/pkgs/sage_4/local/bin/sage-update", line 357, in
> > <module>
> >     do_update()
> >   File "/usr/local/pkgs/sage_4/local/bin/sage-update", line 266, in
> > do_update
> >     packages = spkg_list('standard')
> >   File "/usr/local/pkgs/sage_4/local/bin/sage-update", line 202, in
> > spkg_list
> >     urllib.urlretrieve(web_url, file, reporthook)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/urllib.py", line 94,
> > in urlretrieve
> >     return _urlopener.retrieve(url, filename, reporthook, data)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/urllib.py", line 238,
> > in retrieve
> >     fp = self.open(url, data)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/urllib.py", line 206,
> > in open
> >     return getattr(self, name)(url)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/urllib.py", line 345,
> > in open_http
> >     h.endheaders()
> >   File "/usr/local/pkgs/sage_4/local/lib/python/httplib.py", line 892,
> > in endheaders
> >     self._send_output()
> >   File "/usr/local/pkgs/sage_4/local/lib/python/httplib.py", line 764,
> > in _send_output
> >     self.send(msg)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/httplib.py", line 723,
> > in send
> >     self.connect()
> >   File "/usr/local/pkgs/sage_4/local/lib/python/httplib.py", line 704,
> > in connect
> >     self.timeout)
> >   File "/usr/local/pkgs/sage_4/local/lib/python/socket.py", line 516,
> > in create_connection
> >     raise error, msg
> > IOError: [Errno socket error] timed out
> > Error getting new packages!
>
> > I had a similar problem with 4.5.1 to 4.5.2 which never got resolved.
> > The old thread is below. Please advise.
>
> >http://groups.google.com/group/sage-support/browse_thread/thread/e832...
>
> Could you report what happens with
>
> sage: import urllib
> sage: urllib.urlretrieve('http://www.sagemath.org//spkg', 'test.html')
> ('test.html', <httplib.HTTPMessage instance at 0x47788c0>)
> sage:
>
> ?  This should write a file test.html in the current directory.
>
> Just to be sure, is
>
> http://www.sagemath.org//spkg
>
> accessible from a browser?

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to