Hi Massimo,

I am seeing: 'Mongo' object has no attribute 'server_version_major'"

S'Traceback (most recent call last):\n  File
"/opt/python/current/app/gluon/restricted.py", line 219, in
restricted\n    exec(ccode,
environment)\n  File
"/opt/python/bundle/2/app/applications/beengo/models/db.py", line 42, in
<module>\n    session.connect(request, response, db, masterapp=None)\n  File
"/opt/python/current/app/gluon/globals.py", line 965, in connect\n    row =
table(record_id, unique_key=unique_key)\n  File
"/opt/python/run/venv/local/lib/python2.7/site-packages/pydal/objects.py",
line 703, in __call__\n    orderby_on_limitby=False,\n  File
"/opt/python/run/venv/local/lib/python2.7/site-packages/pydal/objects.py",
line 2634, in select\n    return adapter.select(self.query, fields,
attributes)\n  File
"/opt/python/run/venv/local/lib/python2.7/site-packages/pydal/adapters/mongo.py",
line 242, in select\n    return self.__select(query, fields, **attributes)\n
File
"/opt/python/run/venv/local/lib/python2.7/site-packages/pydal/adapters/mongo.py",
line 383, in __select\n    if self.server_version_major <
2.6:\nAttributeError: \'Mongo\' object has no attribute
\'server_version_major\'\n'


any help would be greatly appreciated.


Thanks

On Fri, Dec 27, 2019 at 12:40 PM Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> I made some major changes to pydal:
>
> - internal refactoring in the db connection logic
> - dropped pg8000 support (never worked well)
> - reformatting
>
> The refactoring is a simplification of some pre-existing convoluted logic
> but it also makes it easy to use pydal with multi-threaded (non web2py)
> applications and other frameworks. Basically it automatically re-establish
> a connection when it detects a DB objects is been used in a different
> thread.
>
> Before you had to call db._adapter.reconnect() This is no no longer
> necessary.
>
> One side effect is that db = DAL(...) no longer establishes a connection,
> until the connection is actually used to run a query.
>
> Please report any problem.
>
> Massimo
>
> --
> 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/28987515-0e77-43c2-901a-2aa54f0dccf8%40googlegroups.com
> <https://groups.google.com/d/msgid/web2py/28987515-0e77-43c2-901a-2aa54f0dccf8%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAJCDLEWzQZOZAmdLF3-wTWk-wV8pA85Z9hm-C5YkN2BGgZ1S_g%40mail.gmail.com.

Reply via email to