Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #29220 > unrolled thread

cannot concatenate 'str' and 'list' objects

Started byΝικόλαος Κούρας <nikos.gr33k@gmail.com>
First post2012-09-15 05:22 -0700
Last post2012-09-16 01:46 +1000
Articles 3 on this page of 43 — 5 participants

Back to article view | Back to comp.lang.python


Contents

  cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 05:22 -0700
    Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 05:26 -0700
    Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-15 22:33 +1000
      Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 06:28 -0700
        Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-15 23:38 +1000
          Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 06:53 -0700
            Re: cannot concatenate 'str' and 'list' objects Peter Otten <__peter__@web.de> - 2012-09-15 16:29 +0200
              Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 07:51 -0700
                Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-16 00:55 +1000
              Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 07:51 -0700
          Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 06:53 -0700
            Re: cannot concatenate 'str' and 'list' objects Roy Smith <roy@panix.com> - 2012-09-15 10:21 -0400
              Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 07:44 -0700
                Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-16 00:49 +1000
                Re: cannot concatenate 'str' and 'list' objects Roy Smith <roy@panix.com> - 2012-09-15 11:01 -0400
                  Re: cannot concatenate 'str' and 'list' objects Chris Gonnerman <chris@gonnerman.org> - 2012-09-15 11:09 -0500
      Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 06:28 -0700
    Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 07:56 -0700
    Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 08:01 -0700
    Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 08:06 -0700
      Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-16 01:23 +1000
    Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 08:23 -0700
      Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-16 01:44 +1000
        Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 09:04 -0700
          Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-16 02:25 +1000
            Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 09:53 -0700
              Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-16 02:56 +1000
                Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 10:22 -0700
                  Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 10:26 -0700
                    Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-16 03:42 +1000
                      Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 10:59 -0700
                        Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-16 04:02 +1000
                          Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 11:10 -0700
                            Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-16 09:11 +1000
                          Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 11:10 -0700
                      Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 10:59 -0700
                  Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 10:26 -0700
                Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 10:22 -0700
            Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 09:53 -0700
        Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 09:04 -0700
      Re: cannot concatenate 'str' and 'list' objects Chris Gonnerman <chris@gonnerman.org> - 2012-09-15 11:13 -0500
    Re: cannot concatenate 'str' and 'list' objects Νικόλαος Κούρας <nikos.gr33k@gmail.com> - 2012-09-15 08:33 -0700
      Re: cannot concatenate 'str' and 'list' objects Chris Angelico <rosuav@gmail.com> - 2012-09-16 01:46 +1000

Page 3 of 3 — ← Prev page 1 2 [3]


#29252

FromChris Gonnerman <chris@gonnerman.org>
Date2012-09-15 11:13 -0500
Message-ID<mailman.762.1347726873.27098.python-list@python.org>
In reply to#29243
On 09/15/2012 10:23 AM, Νικόλαος Κούρας wrote:
> I swicthed back my code to:  f = open( '../' + page )
>
> and http://superhost.gr works which means that line gets parsed correctly.
>
> Only when i post data to the text area boxes iam getting the error:
>
> cannot concatenate 'str' and 'list' objects
>
> how is this possible to work before and NOT work when i enter data to the page for storing to the database?
You really need to add some print-type diagnostics to your script 
temporarily, just to see what you are actually getting for parameters. 
For example, put this:

print "Content-type: text/plain\n"

near the top so you can get a source printout, then add

print `page`

just before you attempt your open() call so you can see what the exact 
Python representation of page is. Do similarly for other problems in 
your code. Don't leave such an "instrumented" copy of your CGI script on 
your site for very long and you should be safe.

Also, consider using the built-in cgi traceback feature in your scripts, 
at least while you are debugging them (though you probably want to 
remove the traceback after you are "in production").

-- Chris.

[toc] | [prev] | [next] | [standalone]


#29244

FromΝικόλαος Κούρας <nikos.gr33k@gmail.com>
Date2012-09-15 08:33 -0700
Message-ID<29a8587f-9d7d-4965-b709-b6d5c70ac3a2@googlegroups.com>
In reply to#29220
You are right but iam a new python learner and i created this logging system script as a poject to better learn the lalguage itself.

I  can always use google analytics for serious visitor logging.

Apart from that i enjoy reading my logs by typing:

http://superhost.gr/?show=log

:-)

[toc] | [prev] | [next] | [standalone]


#29246

FromChris Angelico <rosuav@gmail.com>
Date2012-09-16 01:46 +1000
Message-ID<mailman.758.1347723996.27098.python-list@python.org>
In reply to#29244
On Sun, Sep 16, 2012 at 1:33 AM, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:
> You are right but iam a new python learner and i created this logging system script as a poject to better learn the lalguage itself.
>
> I  can always use google analytics for serious visitor logging.
>
> Apart from that i enjoy reading my logs by typing:
>
> http://superhost.gr/?show=log

Yes, and I'm sure random visitors will enjoy reading them too, with no
authentication required. You really shouldn't make all your visitors'
IP addresses and usage stats public. Also, you may want to consider
recording IP addresses for the "reverse dns lookup failed" entries, as
there'll be a lot of them :)

ChrisA

[toc] | [prev] | [standalone]


Page 3 of 3 — ← Prev page 1 2 [3]

Back to top | Article view | comp.lang.python


csiph-web