!!! in appconfig I use not boolean - it need in DB!

if myconf.take('db.migrate'):
    migrate = True ## ONLY BOOLEAN!
else:
    migrate = False ## ONLY BOOLEAN!

if myconf.take('db.fake_migrate'):
    fake_migrate = True ## ONLY BOOLEAN!
else:
    fake_migrate = False ## ONLY BOOLEAN!


        db = DAL(myconf.take('db.uri'), 
pool_size=myconf.take('db.pool_size', cast=int), check_reserved=['all'],
                #migrate = Not (Not (myconf.take('db.migrate'))),
                migrate = migrate,
                fake_migrate = fake_migrate,
                )


четверг, 1 марта 2018 г., 14:52:50 UTC+3 пользователь Dmitri Ermolaev 
написал:
>
> *Error in string:*
> *   format='%(name)s',*
>
> *db.define_table('systems',**   Field('name', length=25, readable=False, 
> comment='name of tokenized system'),**   Field('from_block', 'integer', 
> comment='block was tested'),*
> *   #migrate=False,**   format='%(name)s',**   )*
> <class 'gluon.contrib.pymysql.err.ProgrammingError'> (1146, u"Table 
> 'ipay4_free.systems' doesn't exist")Version
> web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47Traceback
>
> 1.
> 2.
> 3.
> 4.
> 5.
> 6.
> 7.
> 8.
> 9.
> 10.
> 11.
> 12.
> 13.
> 14.
> 15.
> 16.
> 17.
> 18.
> 19.
> 20.
> 21.
> 22.
> 23.
>
> Traceback (most recent call last):
>   File "C:\web2py\gluon\restricted.py", line 227, in restricted
>     exec ccode in environment
>   File "C:/web2py/applications/ipay4_in_free/models/db1.py" 
> <http://127.0.0.1:8000/admin/default/edit/ipay4_in_free/models/db1.py>, line 
> 57, in <module>
>     format='%(name)s',
>   File "C:\web2py\gluon\packages\dal\pydal\base.py", line 834, in define_table
>     table = self.lazy_define_table(tablename,*fields,**args)
>   File "C:\web2py\gluon\packages\dal\pydal\base.py", line 873, in 
> lazy_define_table
>     polymodel=polymodel)
>   File "C:\web2py\gluon\packages\dal\pydal\adapters\base.py", line 510, in 
> create_table
>     fake_migrate=fake_migrate
>   File "C:\web2py\gluon\packages\dal\pydal\adapters\base.py", line 623, in 
> migrate_table
>     self.execute(sub_query)
>   File "C:\web2py\gluon\packages\dal\pydal\adapters\base.py", line 1388, in 
> execute
>     return self.log_execute(*a, **b)
>   File "C:\web2py\gluon\packages\dal\pydal\adapters\base.py", line 1382, in 
> log_execute
>     ret = self.get_cursor().execute(command, *a[1:], **b)
>   File "C:\web2py\gluon\contrib\pymysql\cursors.py", line 117, in execute
>     self.errorhandler(self, exc, value)
>   File "C:\web2py\gluon\contrib\pymysql\connections.py", line 202, in 
> defaulterrorhandler
>     raise errorclass, errorvalue
> ProgrammingError: (1146, u"Table 'ipay4_free.systems' doesn't exist")
>
>

-- 
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.

Reply via email to