V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX Workspace
https://workspace.v2ex.com/
icerunz
V2EX  ›  Project Stormwind

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

  •  
  •   icerunz · 2011-10-11 10:33:16 +08:00 · 3683 次点击
    这是一个创建于 4774 天前的主题,其中的信息可能已经有所发展或是发生改变。
    当新建的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
    1 条回复    1970-01-01 08:00:00 +08:00
    Livid
        1
    Livid  
    MOD
       2011-10-11 11:02:33 +08:00
    这是目前的一个已知问题。

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

    http://workspace.v2ex.com/faq

    我会尽快解决这个问题的。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3888 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 22ms · UTC 04:15 · PVG 12:15 · LAX 20:15 · JFK 23:15
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.