def planilla():
id_user = (auth.user and auth.user.id) or None
plugin_inscripcion_temp_id = request.args[0]
plugin_inscripcion_temp =
db.plugin_inscripcion_temp(id=plugin_inscripcion_temp_id, user=id_user)
if plugin_inscripcion_temp is None:
session.flash = 'Error proceso no encontrado'
redirect (request.env.http_referer)
if plugin_inscripcion_temp.periodo_academico is None:
session.flash = 'El estudiante no ha definido los datos de la
inscripcion'
redirect (request.env.http_referer)
perfil = db.perfil(user=plugin_inscripcion_temp.user)
return dict(plugin_inscripcion_temp=plugin_inscripcion_temp,
perfil=perfil)
El viernes, 7 de diciembre de 2012 09:26:09 UTC-4:30, Anthony escribió:
>
> I don't think the cache system is causing the problem. In this line:
>
> plugin_inscripcion_temp = db.plugin_inscripcion_temp(id=
> plugin_inscripcion_temp_id, user=id_user)
>
> the value of either plugin_inscripcion_temp or id_user is 'cache' (i.e., a
> string literal, not the web2py cache object) rather than an integer. It's
> hard to say why that is the case without seeing more code.
>
> Anthony
>
> On Friday, December 7, 2012 8:31:07 AM UTC-5, www.diazluis.com wrote:
>>
>> greetings to all.
>> Thanks for your time.
>>
>> lately I've been spending
>> have my app cache error
>> but I do not use the cache
>>
>> my app using sqlite database, and run on your own server.
>>
>> I use debian 6
>> web2py v. 2.2.1
>>
>> the error I have is:
>>
>> 19 plugin_inscripcion_temp.py ValueError: invalid literal for int() with
>> base 10: 'cache' + details
>>
>> Traceback (most recent call last):
>> File "/home/www-data/web2py/gluon/restricted.py", line 209, in
>> restricted
>> exec ccode in environment
>> File
>> "/home/www-data/web2py/applications/sinca/controllers/plugin_inscripcion_temp.py",
>>
>> line 264, in <module>
>> File "/home/www-data/web2py/gluon/globals.py", line 186, in <lambda>
>> self._caller = lambda f: f()
>> File
>> "/home/www-data/web2py/applications/sinca/controllers/plugin_inscripcion_temp.py",
>>
>> line 102, in planilla
>> plugin_inscripcion_temp =
>> db.plugin_inscripcion_temp(id=plugin_inscripcion_temp_id, user=id_user)
>> File "/home/www-data/web2py/gluon/dal.py", line 7646, in __call__
>> return
>> self._db(query).select(limitby=(0,1),for_update=for_update).first()
>> File "/home/www-data/web2py/gluon/dal.py", line 8766, in select
>> return adapter.select(self.query,fields,attributes)
>> File "/home/www-data/web2py/gluon/dal.py", line 2094, in select
>> return super(SQLiteAdapter, self).select(query, fields, attributes)
>> File "/home/www-data/web2py/gluon/dal.py", line 1581, in select
>> sql = self._select(query, fields, attributes)
>> File "/home/www-data/web2py/gluon/dal.py", line 1444, in _select
>> sql_w = ' WHERE ' + self.expand(query)
>> File "/home/www-data/web2py/gluon/dal.py", line 1277, in expand
>> return op(first, second)
>> File "/home/www-data/web2py/gluon/dal.py", line 1160, in AND
>> return '(%s AND %s)' % (self.expand(first), self.expand(second))
>> File "/home/www-data/web2py/gluon/dal.py", line 1277, in expand
>> return op(first, second)
>> File "/home/www-data/web2py/gluon/dal.py", line 1205, in EQ
>> self.expand(second, first.type))
>> File "/home/www-data/web2py/gluon/dal.py", line 1287, in expand
>> return str(self.represent(expression,field_type))
>> File "/home/www-data/web2py/gluon/dal.py", line 1708, in represent
>> return str(int(obj))
>> ValueError: invalid literal for int() with base 10: 'cache'
>>
>> ########## END
>>
>> cleared, the app works! ..
>> but every morning when I arrive, I find a list of such errors.
>>
>> Currently the app is processing the registration (filled profile) from
>> 2900 users.
>> sorry if I am not clear .. my language is Spanish
>>
>>
--