#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    23
    Rep Power
    0

    IO Error can't connect using urllib


    Hello I am getting the following error when trying to connect to a website.

    Here is the error:
    File "C:\Python23\lib\httplib.py", line 548, in connect
    raise socket.error, msg
    IOError: [Errno socket error] (10061, 'Connection refused')

    Here is the code that I am trying to run:
    Code:
    import urllib 
    
    page = urllib.urlopen('http://www.amazon.com').read() 
    open('amazon.txt', 'w').write(page)
    I don't think my script is getting outside of my PC. Any Suggestions?

    Thanks,
    Chuck
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    23
    Rep Power
    0
    Fixed the problem. It was a proxy setting.

    Chuck

IMN logo majestic logo threadwatch logo seochat tools logo