Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
8502 Lượt xem

Hi, I've got some problems with XML-RPC request on windows.

      sock_common = xmlrpclib.ServerProxy (path +"/xmlrpc/common")
       uid = sock_common.login(dbname, pseudo, pwd)
       sock = xmlrpclib.ServerProxy(path +'/xmlrpc/object')

       search = sock.execute(dbname, uid, pwd, request, 'search', [])
       read = sock.execute(dbname, uid, pwd, request, 'read', search,fields)

This code work perfectly on Linux but fail on windows with this error:

    read = sock.execute(dbname, uid, pwd, request, 'read', search,fields)
  File "C:\Python27\lib\xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "C:\Python27\lib\xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "C:\Python27\lib\xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "C:\Python27\lib\xmlrpclib.py", line 1297, in single_request
    return self.parse_response(response)
  File "C:\Python27\lib\xmlrpclib.py", line 1467, in parse_response
    p.feed(data)
  File "C:\Python27\lib\xmlrpclib.py", line 557, in feed
    self._parser.Parse(data, 0)
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 697, column 17

with OpenERP v6, windows 7 32 bits, python 2.7

Have you any idea why it's fail? thank in advance.

Ảnh đại diện
Huỷ bỏ

Are you running your requests from the same computer as the OE server? Because Windows and Linux do have issues regarding the language settings (Windows vs Unicode).

Tác giả

openERP is on a linux Server. Have you a test or a solution for that?

My solution usually is to have the server and code run on the same kind of OS.

it happened to me with redhat linux
but it is okay with ubuntu
my company policy is to use redhat and im in trouble xmlrpc is not working

Câu trả lời hay nhất

Hi

My suggestion is that first you should test the XML-RPC connection with python command line IDE

because there are many different dependencies in python (windows)then linux

Thanks
Sandeep

Ảnh đại diện
Huỷ bỏ
Tác giả

Thank for trying to help, I did it, but I got the same problem :/

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 3 15
4194
5
thg 11 19
5229
3
thg 2 17
10460
2
thg 3 22
21977
1
thg 10 15
3712