urllib.open problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Astan Chee

    #1

    urllib.open problem

    Hi Guys,
    I have a python script which runs perfectly on my machine.
    However a machine that I tested it on gives the following error
    message:

    Traceback (most recent call last):
    File "whip.py", line 616, in OnRebootRunning
    File "whip.py", line 626, in RebootCustom
    File "urllib.pyc ", line 77, in urlopen
    File "urllib.pyc ", line 170, in open
    TypeError: cannot concatenate 'str' and 'NoneType' objects

    The code snipplet where this error
    happens is
    f = urllib.urlopen( "http://www.hotmail.com/)
    notes= f.readlines()

    Does anyone know what causes this error? Im perplexed because it works
    on some machines and it doesnt work on other computers although they all
    have the same spec.
    Thanks for the help
    Cheers
    Stan
  • Dennis Lee Bieber

    #2
    Re: urllib.open problem

    On Thu, 15 Sep 2005 09:19:53 +1000, Astan Chee <stanc@al.com.a u>
    declaimed the following in comp.lang.pytho n:
    [color=blue]
    > The code snipplet where this error
    > happens is
    > f = urllib.urlopen( "http://www.hotmail.com/)
    > notes= f.readlines()
    >[/color]
    Is that a cut&paste, or did you type it by hand?

    Note that you have no closing " on that URL.
    --[color=blue]
    > =============== =============== =============== =============== == <
    > wlfraed@ix.netc om.com | Wulfraed Dennis Lee Bieber KD6MOG <
    > wulfraed@dm.net | Bestiaria Support Staff <
    > =============== =============== =============== =============== == <
    > Home Page: <http://www.dm.net/~wulfraed/> <
    > Overflow Page: <http://wlfraed.home.ne tcom.com/> <[/color]

    Comment

    Working...