How to fix "request was received using an HTTP method that is not supported by the mapped resource" with Appium method ActionChains?

ENVIRONMENT:

Python 3.10

Windows 10.0.22621

npm 6.13.4

adb Android Debug Bridge version 1.0.41

java version “1.8.0_241”

sdkmanager 4.0.1

appium 1.22.3

PROBLEM:

I want to click and hold on a smartphone element with Appium and python. I am trying to execute this code:

actions = ActionChains(p_driver)
actions.click_and_hold(bottom_right_avatar)
actions.perform()

But I get this issue:

The requested resource could not be found, or a request was received using an HTTP method that is not supported by the mapped resource

This error message occurs when Python try to execute the last line "actions.perform()"
Anyone knows how to fix it please?

I would start by updating your appium server version to appium 2.
Appium 1 is not supported anymore.

Thanks. But I tried Appium 2 and it is a catastroph for me. It bugs everywhere:
I developped a software with many lines of code. Appium 2 broke everything. Too many issues.

just update your code. you still will need to do this anyway …