views:

56

answers:

1

Hi! I'm starting learning some about CouchDB by the Definiteve Guide. There is example - blog system Sofa. I'm downloading it, but when I try push it, I catch exception.2010-09-19 14:38:15 [CRITICAL] 'str' object has no attribute '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'

Here warnings that comes before it

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

after all it, application started but in some strange way 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}

Where I was wrong? Thanks.

+1  A: 

Use "couchapp push .\sofa sofa" instead of "couchapp push . sofa"

anonymous
@anonymous : Thanks a lot!)
Stas