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

Mongos + Pymongo 2.5 ==>No suitable hosts found
pymongo collection add item using update
How to convert objectid to string
Conditional atomic mongo remove with different results
python script to connect to mongodb master
flask-admin and pymongo search
Running code when mongoengine loads a document
Can't replace mongo document
How do I call a function with pymongo using webpy?
python motor offers fetch_next exception on aggregation
python motor mongo cursor length or peek next
PyMongo check if update succeeded
insert and query an OrderedDict in MongoHQ
Return .str of ObjectID using pymongo
Selecting the lowest/highest with find_one in Pymongo
Safe use of Pymongo's find_one

Categories

HOME
python-2.7
macos-sierra
windows-8.1
vagrant
angular-ui-grid
jms
opencv-python
mousemove
filesize
malware
azure-logic-apps
slide
parsley.js
cname
cuba-platform
sonata
max-msp-jitter
synthesis
android-contacts
rpmbuild
boomi
infrared
hdl
maven-surefire-plugin
multi-upload
function-points
dragula
jstree
unordered-multimap
morris.js
clipboard
adapter
amazon-iam
mapnik
quick-nimble
xcrun
lxml
private-key
osx-lion
gsp
xmlunit
directfb
numerics
microsoft-ui-automation
task-parallel-library
secure-coding
asihttprequest
react-intl
intellij-lombok-plugin
mura
polymaps
business-rules
adobe-reader
prefetch
bpms
thread-exceptions
logical
clp
p6spy
declarative
facebook-ios-sdk
fdt
enunciate
place
mixins
sqlbase
gitlab-omnibus
dynamics-ax-2012-r2
prism-4
innerhtml
nssortdescriptor
subview
encryption-symmetric
symja
iplimage
strcmp
mp4parser
jquery-transit
google-code-prettify
lru
void-pointers
axacropdf
multiple-dispatch
jquery-dialog
arrow
prototypal-inheritance
mvcrecaptcha
snackjs
data-dump

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App