pymongo


Get OperationFailure error with PyMongo 2.7.1


I run into an OperationFailure error with PyMongo 2.7.1 with the following code:
db.business.update(
{'_id': ObjectId(business_id)},
{
'$set': {'photos.primary': photo_url},
'$push': {'photos.secondary': old_primary_url}
}
)
I get the following error, when the primary member already has a value
<class 'pymongo.errors.OperationFailure'>: '$set' is empty
Has anyone an idea to tackle this?
Best

Related Links

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

Categories

HOME
ionic2
ontouchlistener
android-fragments
livecode
plaid
website
portable-class-library
google-webmaster-tools
material-components
javafx-8
save
jpa-criteria
live-streaming
reselect
playframework-2.0
pickle
office-ui-fabric
tfsbuild
android-custom-view
dashdb
el
conda
password-generator
introspection
high-availability
clipboard
jackrabbit-oak
oracleforms
macromedia
php-5.3
tsung
mdns
splunk-query
intune
infopath2010
quick-nimble
delayed-job
osx-lion
nest
serversocket
nanogallery
praat
export-to-pdf
right-click
robust
dbcc
virtual-memory
expandablelistview
zend-form
swift2.3
xcglogger
knockout-2.0
jgrapht
skip-lists
aurelia-fetch-client
dynamics-crm-4
hmmlearn
boost-compute
haraka
ternary-operator
clp
nsdata
xcode8-beta4
fiber
apache-pig-grunt
maximize
gravatar
taco
flask-security
diawi
jnlp
uitest
karma-coverage
azure-xplat-cli
signed
kognitio-wx2
mojo
nanomsg
juttle
datagridcomboboxcolumn
visual-c++-2012
aho-corasick
webautomation
boolean-algebra
django-settings
apache-shindig
mp4parser
disjoint-union
tnt4j
void-pointers
donut-chart
session-0-isolation
icenium
jquery-dialog
getopt-long
fitch-proofs
motodev-studio
play2-mini
filelock
formal-semantics
hungarian-notation
icicles
stretchblt
activex-exe
error-detection

Resources

Encrypt Message