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

Νίκος Γκρ33κ nikos.gr33k at gmail.com
Fri Mar 8 11:35:09 EST 2013


A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.

 /home/nikos/public_html/cgi-bin/metrites.py in ()
   12 
   13 htmlpage = form.getvalue('htmlpage')
   14 if re.search( r'(.html|.py)', htmlpage ):
   15         htmlpage = htmlpage.replace( '/home/nikos/public_html/', '' )
   16 else:
re = <module 're' from '/usr/lib64/python2.6/re.pyc'>, re.search = <function search>, htmlpage = ['/home/nikos/public_html/index.html', 'pelatologio.py']
 /usr/lib64/python2.6/re.py in search(pattern='(.html|.py)', string=['/home/nikos/public_html/index.html', 'pelatologio.py'], flags=0)
  140     """Scan through string looking for a match to the pattern, returning
  141     a match object, or None if no match was found."""
  142     return _compile(pattern, flags).search(string)
  143 
  144 def sub(pattern, repl, string, count=0):
global _compile = <function _compile>, pattern = '(.html|.py)', flags = 0, ).search undefined, string = ['/home/nikos/public_html/index.html', 'pelatologio.py']
<type 'exceptions.TypeError'>: expected string or buffer 
      args = ('expected string or buffer',) 
      message = 'expected string or buffer'
==============================

The code worksmy webpoage appear when i http://superhost.gr but whne i click a link on it for exmaple the 1st imaeg shown i get this error, and in evry link too.



More information about the Python-list mailing list