I cant understand this error when i click a link on my website

Chris Angelico rosuav at gmail.com
Fri Mar 8 17:46:35 CET 2013


On Sat, Mar 9, 2013 at 3:35 AM, Νίκος Γκρ33κ <nikos.gr33k at gmail.com> wrote:
>    15         htmlpage = htmlpage.replace( '/home/nikos/public_html/', '' )
> re = <module 're' from '/usr/lib64/python2.6/re.pyc'>, re.search = <function search>, htmlpage = ['/home/nikos/public_html/index.html', 'pelatologio.py']
> <type 'exceptions.TypeError'>: expected string or buffer

The regular expression functions expect a string (or a buffer), but
you're passing it a list.

Learning to read exception tracebacks is one of the important parts of
becoming a competent programmer.

ChrisA



More information about the Python-list mailing list