[Tutor] Can you help me figure out what the problem is?

kiran at mhowlinux.org kiran at mhowlinux.org
Tue Feb 10 02:51:31 EST 2004


hi,


  you haven't defined  " link_2_src"

you have taken the input for link_1_src  but not link_2_src

its none type

u shud be initialising all strings to " " rather than None
to check
simply put
link_2_src=""






-kiran


>
> Message: 8
> Date: Thu, 5 Feb 2004 18:26:55 -0600
> From: "matthew mazzola" <mdmazzola at charter.net>
> Subject: > To: <tutor at python.org>
> Message-ID: <000801c3ec47$eeb8d6b0$eb316b18 at yourgv9eh6ors1>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I am trying to make a web page editor program. It's really simple so i
think someone experience would be able to fix it easily. The file is
attached and copied on the bottom of this email but make sure your window is
maximized or it'll ruin formatting. It complains with:
>
>     Traceback (most recent call last):
>   File "<string>", line 1, in ?
>   File "C:\Python22\webpage_editor.py", line 82, in ?
>     matts_template = ["<html>",
> TypeError: cannot concatenate 'str' and 'NoneType' objects
>
>
> The File Source:
>
> --------------------------------------------------------------------------
-------------------------------------------------------------
>
> # Make Your Own Webpage
> # THIS IS MINE I MADE IT ALL MINE
> # Matt Mazzola - 2/4/04
>
> #Welcome User
> print "\t Welcome to Matt Mazzola's\n\t\t-----------\n\t\tWeb Page Editor"
>
> #Ask them what they want to have on their Page by main elemts
> raw_input("press enter to see the layout of the page...")
> print \
> """
>                       Here is the layout of your page.
>
>         (Pay attention to the sections of the page
>         because you will later be asked what you
>         want in those sectoins.)
>         Also, rember title is the what you want the window title bar to
display
>         and background is the color of the web page backgroud.
> """
>
> layout = """
>   title/background
>  +----------------------------------------------------------------------+
>  |                                 Header                               |
>  +----------------------------------------------------------------------+
>  +-----------------+ +-----------------------------+ +------------------+
>  | Navigation      | |  Main Topic Title           | |  Interaction     |
>  +-----------------+ +-----------------------------+ +------------------+
>  |link 1           | | Sub Title                   | | Questoin for poll|
>  |link 2           | |   paragraph                 | | form for poll    |
>  +-----------------+ +-----------------------------+ +------------------+
>  +----------------------------------------------------------------------+
>  |                               Footer                                 |
>  +----------------------------------------------------------------------+
>      """
> print layout
>
>
>
>


Beware the lollipop of mediocrity: lick it once and you suck forever
www.mhowlinux.org Helping Linux users in Mhow

hi,


  you haven't defined  " link_2_src"

you have taken the input for link_1_src  but not link_2_src

its none type

u shud be initialising all strings to " " rather than None
to check
simply put
link_2_src=""






-kiran


>
> Message: 8
> Date: Thu, 5 Feb 2004 18:26:55 -0600
> From: "matthew mazzola" <mdmazzola at charter.net>
> Subject: > To: <tutor at python.org>
> Message-ID: <000801c3ec47$eeb8d6b0$eb316b18 at yourgv9eh6ors1>
> Content-Type: text/plain; charset="iso-8859-1"
>
> I am trying to make a web page editor program. It's really simple so i
think someone experience would be able to fix it easily. The file is
attached and copied on the bottom of this email but make sure your window is
maximized or it'll ruin formatting. It complains with:
>
>     Traceback (most recent call last):
>   File "<string>", line 1, in ?
>   File "C:\Python22\webpage_editor.py", line 82, in ?
>     matts_template = ["<html>",
> TypeError: cannot concatenate 'str' and 'NoneType' objects
>
>
> The File Source:
>
> --------------------------------------------------------------------------
-------------------------------------------------------------
>
> # Make Your Own Webpage
> # THIS IS MINE I MADE IT ALL MINE
> # Matt Mazzola - 2/4/04
>
> #Welcome User
> print "\t Welcome to Matt Mazzola's\n\t\t-----------\n\t\tWeb Page Editor"
>
> #Ask them what they want to have on their Page by main elemts
> raw_input("press enter to see the layout of the page...")
> print \
> """
>                       Here is the layout of your page.
>
>         (Pay attention to the sections of the page
>         because you will later be asked what you
>         want in those sectoins.)
>         Also, rember title is the what you want the window title bar to
display
>         and background is the color of the web page backgroud.
> """
>
> layout = """
>   title/background
>  +----------------------------------------------------------------------+
>  |                                 Header                               |
>  +----------------------------------------------------------------------+
>  +-----------------+ +-----------------------------+ +------------------+
>  | Navigation      | |  Main Topic Title           | |  Interaction     |
>  +-----------------+ +-----------------------------+ +------------------+
>  |link 1           | | Sub Title                   | | Questoin for poll|
>  |link 2           | |   paragraph                 | | form for poll    |
>  +-----------------+ +-----------------------------+ +------------------+
>  +----------------------------------------------------------------------+
>  |                               Footer                                 |
>  +----------------------------------------------------------------------+
>      """
> print layout
>
>
>
>


Beware the lollipop of mediocrity: lick it once and you suck forever
www.mhowlinux.org Helping Linux users in Mhow




More information about the Tutor mailing list