On Saturday, March 1, 2025 at 10:43:47 PM UTC-8 Dave S wrote:

Anyone know what causes this error?


Maybe I do now.

Traceback (most recent call last):
  File 
"C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\restricted.py", 
line 219, in restricted
    exec(ccode, environment)
  File 
"C:/Users/Dave/web2py_src/web2py_src-2.22.5/web2py/applications/badlist/controllers/default.py",
 
line 4178, in <module>
  File 
"C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\globals.py", line 
430, in <lambda>
    self._caller = lambda f: f()
  File 
"C:/Users/Dave/web2py_src/web2py_src-2.22.5/web2py/applications/badlist/controllers/default.py",
 
line 568, in movepic
    row = db(db.mypic.iurl.contains(form.vars.image_url)).select().first()
  File 
"C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\objects.py",
 
line 2722, in select
    return adapter.select(self.query, fields, attributes)
  File 
"C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\adapters\sqlite.py",
 
line 87, in select
    return super(SQLite, self).select(query, fields, attributes)
  File 
"C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\adapters\base.py",
 
line 904, in select
    colnames, sql = self._select_wcols(query, fields, **attributes)
  File 
"C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\adapters\base.py",
 
line 787, in _select_wcols
    query = self.expand(query, query_env=query_env)
  File 
"C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\adapters\base.py",
 
line 496, in _expand
    rv = op(first, **optional_args)
TypeError: SQLDialect.contains() missing 1 required positional argument: 
'second'


There isn't anything useful on the error page to understand what went 
wrong, and this is a call that I've been making forever.  (no vars are 
shown, and there's no code for any of the stack frames, other than the 
single lines in the traceback).

/dps


I think I figured out that line 568 was getting a null or null string for 
the contains().

/dps

-- 
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 web2py+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/web2py/0f1fcfab-16d4-45be-a589-ee00c619c28an%40googlegroups.com.

Reply via email to