serhatbolsu/robotframework-appiumlibrary

ModuleNotFoundError: No module named 'appium.webdriver.common.touch_action'

Closed this issue · 2 comments

-1

I am currently doing a new setup as I switched over to mac. I am trying to set up Python, Robotframework and appium in this device. I believe, I have installed everything thats needed and specified the path in .bash_profile. However, when I run any test I get the below error:

[ ERROR ] Error in file '/Users/shettya/nemo-qs/Nemo/GlobalParameters/GlobalKeywords/ErwinLoginAndSelectRoll.robot' on line 2: Importing library 'AppiumLibrary' failed: ModuleNotFoundError: No module named 'appium.webdriver.common.touch_action'

Traceback (most recent call last):
File "/opt/homebrew/anaconda3/lib/python3.11/site-packages/AppiumLibrary/init.py", line 4, in
from AppiumLibrary.keywords import *
File "/opt/homebrew/anaconda3/lib/python3.11/site-packages/AppiumLibrary/keywords/init.py", line 9, in
from ._touch import _TouchKeywords
File "/opt/homebrew/anaconda3/lib/python3.11/site-packages/AppiumLibrary/keywords/_touch.py", line 3, in
from appium.webdriver.common.touch_action import TouchAction

PYTHONPATH:
/Users/shettya/nemo-qs/lib
/Users/shettya/nemo-qs/resources
/Users/shettya/.vscode/extensions/d-biehl.robotcode-0.78.4/bundled/libs
/Users/shettya/.vscode/extensions/d-biehl.robotcode-0.78.4/bundled/tool/robotcode
/opt/homebrew/anaconda3/lib/python311.zip
/opt/homebrew/anaconda3/lib/python3.11
/opt/homebrew/anaconda3/lib/python3.11/lib-dynload
/opt/homebrew/anaconda3/lib/python3.11/site-packages
/opt/homebrew/anaconda3/lib/python3.11/site-packages/aeosa
Here are all the installations when I pip3 list:

Package Version


Appium-Python-Client 4.0.0
attrs 23.2.0
certifi 2024.2.2
cffi 1.16.0
charset-normalizer 3.3.2
click 8.1.7
cryptography 42.0.5
decorator 5.1.1
docutils 0.21
grpcio 1.62.1
grpcio-tools 1.62.1
h11 0.14.0
idna 3.6
kitchen 1.2.6
numpy 1.26.4
opencv-python 4.9.0.80
outcome 1.3.0.post0
overrides 7.7.0
packaging 24.0
pillow 10.2.0
pip 24.0
protobuf 4.25.3
pycparser 2.22
PySocks 1.7.1
pytesseract 0.3.10
requests 2.31.0
robotframework 7.0
robotframework-appiumlibrary 2.0.0
robotframework-archivelibrary 0.4.2
robotframework-assertion-engine 3.0.3
robotframework-browser 18.3.0
robotframework-pythonlibcore 4.4.1
robotframework-requests 0.9.7
robotframework-seleniumlibrary 6.2.0
selenium 4.19.0
setuptools 69.2.0
six 1.16.0
sniffio 1.3.1
sortedcontainers 2.4.0
trio 0.25.0
trio-websocket 0.11.1
typing_extensions 4.11.0
urllib3 1.26.6
wheel 0.43.0
wrapt 1.16.0
wsproto 1.2.0
Also, .bash_profile contains contains python and RF installations:

export PATH="/opt/homebrew/anaconda3/bin:export:$PATH"

  • I am using python interpreter 3.11 on VSCode.
  • I have tried pip3 install --force-reinstall "Appium-Python-Client<4.0.0" . This solution doesnt work either.

Please advice, what am I doing wrong and how can I fix this?

Thank you very much.

I have the same error under Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-100-generic x86_64) with version 2.0.0

I downgraded appium python client and it worked!
pip install appium-python-client==2.11.1