Join GitHub today
pymongo and rpyc #165
I'm trying to use pymongo out of IronPython, and I'm having issues. For a simple example, I just want to extract the database names:
import rpyc c = rpyc.classic.connect('localhost', port=12345) pymongo = c.modules['pymongo'] conn = pymongo.MongoClient('localhost') print conn.database_names()
This returns the following from IronPython:
Message: 'Database' object is not callable. If you meant to call the 'exposed_database_names' method on a 'MongoClient' object it is failing because no such method exists.
This works perfectly under 'regular' python, which is running a classic server. Any ideas on why this doesn't work or what the error message means?
Hi, quick note:
This issue occurs on CPython as well and is not in any way specific to IronPython or windows.
The reason is the
Possible server-side fixes:
Possible fixes in rpyc:
EDIT: I finally came to the conclusion that these changes are a good idea on their own to keep the principle of least surprise and have therefore applied these fixes to rpyc. It should be included in the next release (4.0).