V2EX Workspace
https://workspace.v2ex.com/
icerunz

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

  •  
  •   icerunz · Oct 11, 2011 · 4394 views
    This topic created in 5408 days ago, the information mentioned may be changed or developed.
    当新建的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 replies    1970-01-01 08:00:00 +08:00
    Livid
        1
    Livid  
    MOD
    PRO
       Oct 11, 2011
    这是目前的一个已知问题。

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

    http://workspace.v2ex.com/faq

    我会尽快解决这个问题的。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1493 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 16:32 · PVG 00:32 · LAX 09:32 · JFK 12:32
    ♥ Do have faith in what you're doing.