Ver Mensaje Individual
  #6 (permalink)  
Antiguo 23/06/2011, 16:46
poeta3d
 
Fecha de Ingreso: diciembre-2010
Mensajes: 162
Antigüedad: 13 años, 4 meses
Puntos: 1
Respuesta: problemas con sqlite y wxpython

[QUOTE=razpeitia;3904264]
Código Python:
Ver original
  1. self.Bind(wx.EVT_BUTTON,self.onboton)
  2.        
  3.     def onboton(self,event):
  4.      
  5.             x=self.textocodigo.GetValue()
  6.             conexion=sqlite3.connect("MOTOS.S3DB")
  7.             cursor=conexion.cursor()
  8.             t=(x, )
  9.             cursor.execute("SELECT CODIGO,PRECIO FROM MOTOS WHERE DETALLE=?",t)
  10.             for row in cursor:
  11.                 self.textocodigo2.SetValue(row[0])
  12.                 dat1=self.textocodigo3.SetValue(row[1])
  13.                 dat=self.textocodigo5.GetValue()
  14.                              
  15.                 dattotal=float(dat)*dat1
  16.                 print dattotal

lo hice como me dijiste asi y me da el error este
dattotal=float(dat)*dat1
TypeError: unsupported operand type(s) for *: 'float' and 'NoneType'


QUOTE]