Hi everyone,
I am trying to connect to the demo database of Odoo using xmlrpc.client in python but I get 404 errors everytime.
I tried this with python 3.10 and 3.13 on a Mac, and 3.13 on windows and I always get the same results.
I also have tried different networks (work, home and hotspot).
Note sure what I am doing wrong here. This is just the example code from the documentation.
I have tried searching for this issue, but there is nobody else with this issue apparently.
import xmlrpc.client
info = xmlrpc.client.ServerProxy("https://demo.odoo.com/start").start()
url, db, username, password = info["host"], info["database"], info["user"], info["password"]
common = xmlrpc.client.ServerProxy("{}/xmlrpc/2/common".format(url))
common.version()
Traceback (most recent call last):
File "<python-input-0>", line 5, in <module>
common.version()
~~~~~~~~~~~~~~^^
File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/xmlrpc/client.py", line 1096, in __call__
return self.__send(self.__name, args)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/xmlrpc/client.py", line 1435, in __request
response = self.__transport.request(
self.__host,
...<2 lines>...
verbose=self.__verbose
)
File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/xmlrpc/client.py", line 1140, in request
return self.single_request(host, handler, request_body, verbose)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/python@3.13/3.13.2/Frameworks/Python.framework/Versions/3.13/lib/python3.13/xmlrpc/client.py", line 1170, in single_request
raise ProtocolError(
...<3 lines>...
)
xmlrpc.client.ProtocolError: <ProtocolError for demo3.odoo.com/xmlrpc/2/common: 404 NOT FOUND>
Hi,
Thank you for your reply @Cybrosys
The code I posted, is letter for letter exactly what is published on those pages.
See "test database"and "logging in" (I can't post links because of low karma).
So I still don't know what I am doing wrong here