Never mind ... I forgot the "requires ="

/dps


On Thursday, October 17, 2024 at 4:10:03 PM UTC-7 Dave S wrote:

> Trying to define a table with IS_IN_SET() on a string field,  we get the 
> exception
> <class 'sqlite3.OperationalError'> near "<": syntax error
>
> sql.log shows why:
> CREATE TABLE "badqpic"(
>     "id" INTEGER PRIMARY KEY AUTOINCREMENT,
>     "isrl" CHAR(512),
>     "isrl_short" CHAR(512),
>     "tmpname" CHAR(512),
>     "tmppext" CHAR(512),
>     "tags" CHAR(<pydal.validators.IS_IN_SET object at 0x000001290744CD30>),
>     "originalid" INTEGER,
>     "postdate" DATE
> );
>
> and the exception traceback shows
> [...]
>
>    - 
>    
>    *File 
>    
> C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\base.py
>  
>    in define_table at line 679* 
>    - 
>    
>    *File 
>    
> C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\base.py
>  
>    in lazy_define_table at line 716* 
>    - 
>    
>    *File 
>    
> C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\adapters\base.py
>  
>    in create_table at line 943* 
>    - 
>    
>    *File 
>    
> C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\migrator.py
>  
>    in create_table at line 337* 
>    - 
>    
>    *File 
>    
> C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\adapters\base.py
>  
>    in create_sequence_and_triggers at line 1027*
>    - 
>    
>    *File 
>    
> C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\adapters\__init__.py
>  
>    in wrap at line 69* 
>    - 
>    
>    *File 
>    
> C:\Users\Dave\web2py_src\web2py_src-2.22.5\web2py\gluon\packages\dal\pydal\adapters\base.py
>  
>    in execute at line 468* 
>    
>    (self=<pydal.adapters.sqlite.SQLite object>, *args=('CREATE TABLE 
>    "babbleqpic"(\n "id" INTEGER PRIMARY...\n "originalid" INTEGER,\n 
>    "postdate" DATE\n);',), **kwargs={})
>    - 
>    
>    Function argument list
>    - 
>    
>    (self=<pydal.adapters.sqlite.SQLite object>, *args=('CREATE TABLE 
>    "babbleqpic"(\n "id" INTEGER PRIMARY...\n "originalid" INTEGER,\n 
>    "postdate" DATE\n);',), **kwargs={})
>    
>
> web2py™
> Version 2.22.5-stable+timestamp.2022.06.04.18.13.51
> Python
> Python 3.10.7: 
> C:\Users\Dave\AppData\Local\Programs\Python\Python310\python.exe (prefix: 
> C:\Users\Dave\AppData\Local\Programs\Python\Python310)
>
>
>

-- 
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 on the web visit 
https://groups.google.com/d/msgid/web2py/47d3c3bf-a0db-4052-a354-3be4ff1e8222n%40googlegroups.com.

Reply via email to