跳至内容
菜单
此问题已终结
4 回复
2756 查看

This is my code:


from xmlrpc import client



url = 'https://ghostinfernalejo-odoo-training-technical-dev-test1-3291583.dev.odoo.com'

db ='ghostinfernalejo-odoo-training-technical-dev-test1-3291583'

username ='Admin'

password ='Admin'



common = client.ServerProxy("{}/xmlrpc/2/common".format(url))

print(common.version())



uid = common.authenticate(db, username, password, {})

print("User ID = ", uid)


This is what my terminal returns : 

{'server_version': '14.0+e', 'server_version_info': [14, 0, 0, 'final', 0, 'e'], 'server_serie': '14.0', 'protocol_version': 1}

User ID = False


please help


形象
丢弃

Make sure you are passing correct user and password.

最佳答案

Hello World Food Industry. What is happening is that your username and password don't match. You are using the demo database, and the admin user is Mitchell Admin. If you go to users and search for Mitchell Admin, you will see that his username is admin, but there is no password set. You can click on Action, choose change password, and set it to admin. Once you do that, you will get the uid which is 2.

形象
丢弃

YES! thank you, this fixed it. if you go in your profile, click the gear next to your name at the top left, and click "change password", the screen that comes up will have the username for your profile that you need to make this work. In my case it was my email.

最佳答案

I am having the same problem

形象
丢弃
最佳答案

Username and password should be "admin". You have "Admin" (uppercase A) in the code posted by you.

形象
丢弃
编写者 最佳答案

hey and thanks for your response, i'm following the technical training and l follow exactly the video tutorial but my still got this error, i'm on the demo plateform i don't know what to do

please really need help it's on day 10

形象
丢弃