我开始通过 Definiteve 指南学习一些有关 CouchDB 的知识。有例子-博客系统沙发。我正在下载它,但是当我尝试推送它时,我捕获了异常。2010-09-19 14:38:15 [CRITICAL] 'str' 对象没有属性 'update'

Traceback (most recent call last):
  File "C:\Program Files\python\27\lib\site-packages\couchapp\dispatch.py", line 48, in dispatch
    return _dispatch(args)
  File "C:\Program Files\python\27\lib\site-packages\couchapp\dispatch.py", line 92, in _dispatch
    return fun(conf, conf.app_dir, *args, **opts)
  File "C:\Program Files\python\27\lib\site-packages\couchapp\commands.py", line 77, in push
    doc.push(dbs, noatomic, browse, force)
  File "C:\Program Files\python\27\lib\site-packages\couchapp\localdoc.py", line 101, in push
    doc = self.doc(db, force=force)
  File "C:\Program Files\python\27\lib\site-packages\couchapp\localdoc.py", line 204, in doc
    self._doc['couchapp'].update({
AttributeError: 'str' object has no attribute 'update'

这里是在它之前出现的警告
C:\Program Files\python\27\Scripts\couchapp-script.pyc isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\couchapp-script.pyc is a binary
use plan C: encode to base64
couchapp-script is already in properties. Can't add (couchapp-script.pyc)
C:\Program Files\python\27\Scripts\couchapp-script.pyo isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\couchapp-script.pyo is a binary
use plan C: encode to base64
couchapp-script is already in properties. Can't add (couchapp-script.pyo)
C:\Program Files\python\27\Scripts\couchapp.exe isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\couchapp.exe is a binary
use plan C: encode to base64
C:\Program Files\python\27\Scripts\easy_install-2.7-script.pyc isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\easy_install-2.7-script.pyc is a binar
use plan C: encode to base64
easy_install-2.7-script is already in properties. Can't add (easy_install-2.7-script.pyc)
C:\Program Files\python\27\Scripts\easy_install-2.7-script.pyo isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\easy_install-2.7-script.pyo is a binar
use plan C: encode to base64
easy_install-2.7-script is already in properties. Can't add (easy_install-2.7-script.pyo)
C:\Program Files\python\27\Scripts\easy_install-2.7.exe isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\easy_install-2.7.exe is a binary
use plan C: encode to base64
C:\Program Files\python\27\Scripts\easy_install-script.pyc isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\easy_install-script.pyc is a binary
use plan C: encode to base64
easy_install-script is already in properties. Can't add (easy_install-script.pyc)
C:\Program Files\python\27\Scripts\easy_install-script.pyo isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\easy_install-script.pyo is a binary
use plan C: encode to base64
easy_install-script is already in properties. Can't add (easy_install-script.pyo)
C:\Program Files\python\27\Scripts\easy_install.exe isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\easy_install.exe is a binary
use plan C: encode to base64
C:\Program Files\python\27\Scripts\pywin32_postinstall.pyc isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\pywin32_postinstall.pyc is a binary
use plan C: encode to base64
pywin32_postinstall is already in properties. Can't add (pywin32_postinstall.pyc)
C:\Program Files\python\27\Scripts\pywin32_postinstall.pyo isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\pywin32_postinstall.pyo is a binary
use plan C: encode to base64
pywin32_postinstall is already in properties. Can't add (pywin32_postinstall.pyo)
C:\Program Files\python\27\Scripts\restcli-script.pyc isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\restcli-script.pyc is a binary
use plan C: encode to base64
restcli-script is already in properties. Can't add (restcli-script.pyc)
C:\Program Files\python\27\Scripts\restcli-script.pyo isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\restcli-script.pyo is a binary
use plan C: encode to base64
restcli-script is already in properties. Can't add (restcli-script.pyo)
C:\Program Files\python\27\Scripts\restcli.exe isn't encoded in utf8
plan B didn't work, C:\Program Files\python\27\Scripts\restcli.exe is a binary
use plan C: encode to base64

毕竟,应用程序以某种奇怪的方式启动
curl http://127.0.0.1:5984/sofa
{"db_name":"sofa", "doc_count":0, "doc_del_count":0, "update_seq":0, "purge_seq":0, "compact_running":false, "disk_size":79, "instance_start_time":"1284892575508000", "disk_format_version":5}

我哪里错了?谢谢。

最佳答案

使用“couchapp push .\sofa SOFA”代替“couchapp push .sofa”

关于couchdb - 使用 CouchDB 启动应用程序时出现异常,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/3745590/

10-11 01:38