After removing the "db = DAL('sqlite://store.sqlite',migrate=False) " at
the top of the module , the error disappears.
Regards.

On Fri, 12 Oct 2018, 23:59 Yoel Benitez Fonseca <[email protected]> wrote:

> In a model do, in db.py at the end if u can:
>
> def _():
>
>     from gluon import current
>
>     current.db = db
>     current.auth = auth
>
> _()
>
>
> Remember's the book says: don't import current into module level code.
>
> On Oct 12 2018, at 12:04 pm, Lovedie JC <[email protected]> wrote:
>
>
> Yes.
>  from gluon import *
> from gluon import current, DAL,field
>
> On Fri, 12 Oct 2018, 18:58 Leonel Câmara <[email protected]> wrote:
>
> Did you import current from gluon before doing that?
>
> --
> 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.
>
>
> --
> 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.
>
> [image: Open Tracking]
>
> --
> 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.
>

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