报告BUG,'文件共享'上传时的问题

2011-10-11 10:33:16 +08:00
 icerunz
当新建的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
3579 次点击
所在节点    Project Stormwind
1 条回复
Livid
2011-10-11 11:02:33 +08:00
这是目前的一个已知问题。

上传的文件名中暂时不支持中文。

http://workspace.v2ex.com/faq

我会尽快解决这个问题的。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/19287

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX