Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #29224
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2012-09-15 06:28 -0700 |
| References | <071ad036-77ca-42d3-b68d-0dd3e3fac43e@googlegroups.com> <mailman.746.1347712435.27098.python-list@python.org> |
| Message-ID | <2138d293-c411-404d-bbf1-1afbae3fc597@googlegroups.com> (permalink) |
| Subject | Re: cannot concatenate 'str' and 'list' objects |
| From | Νικόλαος Κούρας <nikos.gr33k@gmail.com> |
Τη Σάββατο, 15 Σεπτεμβρίου 2012 3:34:34 μ.μ. UTC+3, ο χρήστης Chris Angelico έγραψε:
> On Sat, Sep 15, 2012 at 10:22 PM, Νικόλαος Κούρας <nikos.gr33k@gmail.com> wrote:
>
> > Hello,
>
> >
>
> > I recently changed webhost and in the new one iam getting this error you can see if you visit http://superhost.gr when program execution reaches the line:
>
> >
>
> > f = open( '../' + page )
>
> >
>
> > In the previous host i wasn't getting this error.
>
> >
>
> > page's contents is:
>
> >
>
> > page = form.getvalue('page')
>
>
>
> Well, clearly '../' is a string (str), and page must be a list. But
>
> without knowing your web framework it's hard to be sure what's going
>
> on.
>
>
>
> My guess is that form.getvalue() is returning a list of form elements
>
> with that name, so you have a list with one element in it. But check
>
> your documentation to be sure.
>
>
>
> Since this changed when you changed hosts, it may mean you now have a
>
> completely different framework. Possibly you can configure this.
>
> Alternatively, it may simply be a different version of the same
>
> system. It's hard to know just based on this, though.
>
>
>
> ChrisA
Iam not using frameworks just plain python code written in Notepad++
Can you please tell me how to switch this line in order for this line to work?
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
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
csiph-web