Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProtocolError when upload large file #2

Open
lazywhite opened this issue Oct 26, 2016 · 0 comments
Open

ProtocolError when upload large file #2

lazywhite opened this issue Oct 26, 2016 · 0 comments

Comments

@lazywhite
Copy link

lazywhite commented Oct 26, 2016

when uploading small size file, no this problem

python-script

import xmlrpclib
import base64
import socket
socket.setdefaulttimeout(600)

sock_common = xmlrpclib.ServerProxy('http://dist.n.com:8069/xmlrpc/common', verbose=1)
oe_uid = sock_common.login('app_dist', "iposbuilder", "5FB2C84-AC31-8EEA6078E5F5")
print oe_uid

if oe_uid != False:
    print "login ok"
    sock = xmlrpclib.ServerProxy('http://dist.n.om:8069/xmlrpc/object', verbose=1)
    with open('master.ipa') as f:
        encoded = base64.b64encode(f.read())
        result = sock.execute('app_dist', oe_uid, "584-AC31-8EEA6078E5F5", 'nt.app.distribute.version', 'create', {"app_id":49,"app_version":"1.0.8","file":encoded})

socket.setdefaulttimeout(None)

error output

reply: 'HTTP/1.0 500 INTERNAL SERVER ERROR\r\n'
header: Content-Type: text/html
header: Content-Length: 291
header: Server: Werkzeug/0.8.1 Python/2.7.3
header: Date: Wed, 26 Oct 2016 08:42:50 GMT
Traceback (most recent call last):
  File "a.py", line 15, in <module>
    result = sock.execute('app_dist', oe_uid, "AC31-8EEA6078E5F5", 'nt.app.distribute.version', 'create', {"app_id":49,"app_version":"1.0.8","file":encoded})
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1243, in __call__
    return self.__send(self.__name, args)
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1602, in __request
    verbose=self.__verbose
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1283, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/local/Cellar/python/2.7.12/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xmlrpclib.py", line 1331, in single_request
    response.msg,
xmlrpclib.ProtocolError: <ProtocolError for dist.nexttao.com:8069/xmlrpc/object: 500 INTERNAL SERVER ERROR>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant