A well trodden path through my code seems to fail occasionally as below.
The statement which fails:
rows = db(db.Members.Alias.contains(session.email, case_sensitive =
False)).select()
rows in db.Members contain a column Alias which is 'list:string' containing a
set of alternate
email addresses, users can login from any of their aliases. This seems to fail
on random, but rare occasions.
The ticket doesn't contain anything else, seems to be omitting lots of
information usually presented. I have no idea how
to troubleshoot this??
Error ticket for "init" Ticket ID
73.219.65.40.2018-10-08.17-24-26.7d718b4a-42aa-46fc-b5f3-267f05e347c0
<type 'exceptions.TypeError'> contains() takes at least 3 arguments (4
given) Version
web2py™ Version 2.17.1-stable+timestamp.2018.08.06.01.02.56 Traceback
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
Traceback (most recent call last):
File "/home/oxcamne/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
File "/home/oxcamne/web2py/applications/init/controllers/session.py"
<https://oxcamne.pythonanywhere.com/admin/default/edit/init/controllers/session.py>,
line 85, in <module>
File "/home/oxcamne/web2py/gluon/globals.py", line 421, in <lambda>
self._caller = lambda f: f()
File "/home/oxcamne/web2py/applications/init/controllers/session.py"
<https://oxcamne.pythonanywhere.com/admin/default/edit/init/controllers/session.py>,
line 53, in select
rows = db(db.Members.Alias.contains(session.email, case_sensitive =
False)).select()
File "/home/oxcamne/web2py/gluon/packages/dal/pydal/objects.py", line 2277,
in select
return adapter.select(self.query, fields, attributes)
File "/home/oxcamne/web2py/gluon/packages/dal/pydal/adapters/base.py", line
758, in select
colnames, sql = self._select_wcols(query, fields, **attributes)
File "/home/oxcamne/web2py/gluon/packages/dal/pydal/adapters/base.py", line
673, in _select_wcols
query = self.expand(query, query_env=query_env)
File "/home/oxcamne/web2py/gluon/packages/dal/pydal/adapters/base.py", line
437, in _expand
rv = op(first, **optional_args)
TypeError: contains() takes at least 3 arguments (4 given)
In file: /home/oxcamne/web2py/applications/init/controllers/session.py
1.
<code object <module> at 0x7fbb739dfab0, file
"/home/oxcamne/web2py/applications/init/controllers/session.py", line 7>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.