insertar javascript dentro de python

punchik punchik punchikk en yahoo.com
Sab Jul 12 20:59:03 CEST 2008


hola, ya active cgitb.enable y esto es lo que obtengo, alguna idea? :



OperationalError Python 2.3.5: /usr/bin/python
Sat Jul 12 11:56:46 2008 

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/.stoli/ketaplex/ketaplex.net/cgi-bin/ulttres.py  
   91 
 
   92 #sql='Select * From diccionario'
 
   93 cursor.execute(sql)
 
   94 resultado=cursor.fetchall()
 
   95 
 
cursor = <MySQLdb.cursors.Cursor object>, cursor.execute = <bound method Cursor.execute of <MySQLdb.cursors.Cursor object>>, sql = 'select definicion from d where palabra = "todo"' 


 /usr/lib/python2.3/site-packages/MySQLdb/cursors.py in execute(self=<MySQLdb.cursors.Cursor object>, query='select definicion from d where palabra = "todo"', args=None) 
  135             del tb
 
  136             self.messages.append((exc, value))
 
  137             self.errorhandler(self, exc, value)
 
  138         self._executed = query
 
  139         self._warning_check()
 
self = <MySQLdb.cursors.Cursor object>, self.errorhandler = <bound method Connection.defaulterrorhandler of ...tion open to 'ketaplex.ketaplex.net' at 81ca0a4>>, exc = <class _mysql_exceptions.OperationalError>, value = <_mysql_exceptions.OperationalError instance> 


 /usr/lib/python2.3/site-packages/MySQLdb/connections.py in defaulterrorhandler(connection=<_mysql.connection open to 'ketaplex.ketaplex.net' at 81ca0a4>, cursor=<MySQLdb.cursors.Cursor object>, errorclass=<class _mysql_exceptions.OperationalError>, errorvalue=<_mysql_exceptions.OperationalError instance>) 
   31     else:
 
   32         connection.messages.append(error)
 
   33     raise errorclass, errorvalue
 
   34 
 
   35 
 
errorclass = <class _mysql_exceptions.OperationalError>, errorvalue = <_mysql_exceptions.OperationalError instance> 


OperationalError: (1054, "Unknown column 'definicion' in 'field list'") 
      args = (1054, "Unknown column 'definicion' in 'field list'") 





--- On Sat, 7/12/08, Chema Cortes <pych3m4 en gmail.com> wrote:

> From: Chema Cortes <pych3m4 en gmail.com>
> Subject: Re: [Python-es] insertar javascript dentro de python
> To: "Lista de discusión sobre python en castellano" <python-es en aditel.org>
> Date: Saturday, July 12, 2008, 5:10 AM
> El día 12 de julio de 2008 1:09, punchik punchik
> <punchikk en yahoo.com> escribió:
> > hola amigos, tengo un problema hace dias y no doy con
> la solucion.
> > [....]
> > para hacer esto he ingresado un codigo javascript en
> mi codigo python. El problema que tengo es que cuando
> ingreso el codigo javascript el motor de busqueda  deja de
> funcionarme .
> > aca he subido dos versiones una con el codigo
> javascrip y otra sin el codigo javascript, pueden buscar en
> ambos la palabra "todo"
> 
> No tendría que haber diferencias apreciables entre ambas
> versiones.
> Posiblemente, tengan alguna pequeña diferencia que hace
> que falle el
> script antes de realizar la búsqueda (como que esté mal
> la clave de
> conexión, etc). Activa el depurador cgi a ver si te da
> alguna pista.
> 
> 
> > #!/usr/bin/python
> >
> > import cgi, cgitb, MySQLdb
> 
> cgitb.enable()
> 
> >
> > print "Content-Type: text/html"     # HTML
> is following
> > print                               # blank line, end
> of headers
> _______________________________________________
> Lista de correo Python-es
> http://listas.aditel.org/listinfo/python-es
> FAQ: http://listas.aditel.org/faqpyes


      
_______________________________________________
Lista de correo Python-es 
http://listas.aditel.org/listinfo/python-es
FAQ: http://listas.aditel.org/faqpyes





Más información sobre la lista de distribución Python-es