pymongo


pymongo upgrade to 3.0.3 causes this statement to fail


This statement on pymongo version 2.7.2 works just fine:
allFieldsArray = list(fields.find({"persist": "True"}, fields={'name': 1, 'list_name': 1, '_id': 0}))
When I upgraded to 3.0.3, I get this:
TypeError: init() got an unexpected keyword argument 'fields'
You need to pass projection instead of fields.
allFieldsArray = list(fields.find(
{"persist": "True"},
projection={'name': 1, 'list_name': 1, '_id': 0}))
See the docs.

Related Links

Displaying nested dictionaries in flask-admin
mongoengine slow serialization of embedded documents with reference fields
Pymongo error : 'Cursor' object has no attribute 'find' , how to filter it?
Spark Streaming: foreachRDD insert into mongoDB using python?
how to find right version of bson from pip for pymongo/mongoengine
How to enable `projection` in pymongo query class `find()`?
Variables don't hold value for very long pymongo ipython
pymongo upgrade to 3.0.3 causes this statement to fail
UUID to NUUID in Python
how to test for empty mongodb query in pymong
read video file from mongodb with pymongo
Get OperationFailure error with PyMongo 2.7.1
Inserting string as regular string in mongodb
Mongos + Pymongo 2.5 ==>No suitable hosts found
pymongo collection add item using update
How to convert objectid to string

Categories

HOME
weblogic12c
mpdf
verification
xcode8.1
couchdb
compilation
hid
kivy
plaid
ios-simulator
visual-studio-2010
typeerror
qooxdoo
video-streaming
native-base
wine
driver
twitter-oauth
locationmanager
jquery-select2-4
ex
jpa-2.0
pinterest
fosuserbundle
xsl-fo
android-custom-view
jest
opam
activeadmin
fusetools
hdmi
network-analysis
jackrabbit-oak
gravity-forms-plugin
fusion
sql-execution-plan
winrm
express-session
stackpanel
ms-solver-foundation
android-alarms
microsoft-ui-automation
android-n
plane
uipickerview
angular-datatables
web-inspector
virtual-memory
reverse-dns
jshint
audio-converter
roracle
knockout-2.0
openstack-glance
aurelia-fetch-client
android-mediarecorder
case-when
pecl
rustdoc
maatwebsite-excel
multi-touch
nclam
s-function
logical
msbuild-4.0
fiber
ajaxmin
node-glob
uibinder
exists
fdt
xcopy
json-spirit
juniper-network-connect
http.client
uitest
darwin
angular-amd
sablecc
camus
qt5.4
storing-data
mobile-country-code
webmethod
windows-messages
xulrunner
preorder
django-settings
pbkdf2
node.js-stream
mongo-jackson-mapper
gprof
clrprofiler
cakeyframeanimation
fitch-proofs
fbml
webresponse
chunking
cassini
aggregator
iphone-sdk-4.3
asdoc
main-method
tacit-programming
accumulator
sqlsitemapprovider
parentid

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App