0
我運行的Python 2.7.5和Win7的CouchDB的1.3.0(64),當我保存一個JSON文件得到錯誤信息:couchdb.http.ServerError:(415,(u'bad_content_type',u'Content-Type必須是application/json'))。 ...內容類型必須是application/json的錯誤使用Python 2.7.5和沙發DB 1.30
kkey = 'schluessel'
vvalue = 'Wert'
str1 = [kkey , vvalue]
str2 = json.dumps(str1)
oup.write(str2 + '\n')
# the line above gives: ["schluessel", "Wert"]
doc_id, doc_rev = db.save(str2)
感謝您的幫助
大,這個工程。 Muchas Gracias – user3560278