当新建的Bucket名为中文时出现如下错误:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/tornado-2.1.1-py2.6.egg/tornado/web.py", line 954, in _execute
getattr(self, self.request.method.lower())(*args, **kwargs)
File "/www/workspace/workspace/security.py", line 44, in wrapper
return method(self, *args, **kwargs)
File "/www/workspace/workspace/handlers/desktop/project/files/__init__.py", line 183, in post
db.put_attachment(doc, upload['body'], upload_filename, upload_content_type)
File "/usr/lib/python2.6/site-packages/CouchDB-0.8-py2.6.egg/couchdb/client.py", line 638, in put_attachment
}, rev=doc['_rev'])
File "/usr/lib/python2.6/site-packages/CouchDB-0.8-py2.6.egg/couchdb/http.py", line 405, in put_json
status, headers, data = self.put(*a, **k)
File "/usr/lib/python2.6/site-packages/CouchDB-0.8-py2.6.egg/couchdb/http.py", line 384, in put
return self._request('PUT', path, body=body, headers=headers, **params)
File "/usr/lib/python2.6/site-packages/CouchDB-0.8-py2.6.egg/couchdb/http.py", line 419, in _request
credentials=self.credentials)
File "/usr/lib/python2.6/site-packages/CouchDB-0.8-py2.6.egg/couchdb/http.py", line 280, in request
data = resp.read()
File "/usr/lib64/python2.6/httplib.py", line 525, in read
s = self._safe_read(self.length)
File "/usr/lib64/python2.6/httplib.py", line 615, in _safe_read
chunk = self.fp.read(min(amt, MAXAMOUNT))
File "/usr/lib64/python2.6/socket.py", line 353, in read
data = self._sock.recv(left)
error: [Errno 104] Connection reset by peer
Bucket名字改为英文后出现如下错误:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/tornado-2.1.1-py2.6.egg/tornado/web.py", line 954, in _execute
getattr(self, self.request.method.lower())(*args, **kwargs)
File "/www/workspace/workspace/security.py", line 44, in wrapper
return method(self, *args, **kwargs)
File "/www/workspace/workspace/handlers/desktop/project/files/__init__.py", line 183, in post
db.put_attachment(doc, upload['body'], upload_filename, upload_content_type)
File "/usr/lib/python2.6/site-packages/CouchDB-0.8-py2.6.egg/couchdb/client.py", line 638, in put_attachment
}, rev=doc['_rev'])
File "/usr/lib/python2.6/site-packages/CouchDB-0.8-py2.6.egg/couchdb/http.py", line 405, in put_json
status, headers, data = self.put(*a, **k)
File "/usr/lib/python2.6/site-packages/CouchDB-0.8-py2.6.egg/couchdb/http.py", line 384, in put
return self._request('PUT', path, body=body, headers=headers, **params)
File "/usr/lib/python2.6/site-packages/CouchDB-0.8-py2.6.egg/couchdb/http.py", line 419, in _request
credentials=self.credentials)
File "/usr/lib/python2.6/site-packages/CouchDB-0.8-py2.6.egg/couchdb/http.py", line 310, in request
raise ServerError((status, error))
ServerError: (400, (u'bad_request', u'Attachment name is not UTF-8 encoded'))
提示出现后文件仍能上传,但内容被重写为类似上面错误的内容- -||
另:在文件列表中如果直接点击文件,则返回如下错误:
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/tornado-2.1.1-py2.6.egg/tornado/web.py", line 954, in _execute
getattr(self, self.request.method.lower())(*args, **kwargs)
File "/www/workspace/workspace/handlers/desktop/project/files/__init__.py", line 298, in get
a = db.get_attachment(doc, file_name)
File "/usr/lib/python2.6/site-packages/CouchDB-0.8-py2.6.egg/couchdb/client.py", line 599, in get_attachment
id = id_or_doc['_id']
KeyError: '_id'
上传的内容为20多KB的一个doc文档,中文文件名。
Chrome 14 on MacOS Lion