Skip to Content
Menu
This question has been flagged
2 Replies
9225 Views

import xmlrpclib

url = 'http://localhost:8069'

db = 'odoo'

username = 'admin'

password = 'admin'

info=xmlrpclib.ServerProxy('http://localhost:8069')

 

common = xmlrpclib.ServerProxy(‘{}/xmlrpc/2/common’.format(url))

common.version()

This not showing any version details.Plz help me to sort this out.can any one tell me why its not working?


Avatar
Discard
Best Answer

I run your code and you have an error at this line:

common = xmlrpclib.ServerProxy(‘{}/xmlrpc/2/common’.format(url))

because of the use of non string characters ‘’

it should be:

common = xmlrpclib.ServerProxy('{}/xmlrpc/2/common'.format(url))
Avatar
Discard

solved then? could you accept the answer on the check mark?

Best Answer

Hello,

I just tested your script and it is working fine with me[I just changed the quote char]. Kindly make sure that the Odoo server is running ...

[Just to make sure, did you put common.version() after print keyword : print common.version()]


Regards,

Avatar
Discard
Related Posts Replies Views Activity
0
Apr 24
399
4
Nov 23
4246
0
Oct 23
378
0
Dec 22
1334
2
Dec 23
17351