0

I had update Robot Framework into the newer version Here are pip list that I had already download

Package                         Version
------------------------------- -----------
Appium-Python-Client            0.49
certifi                         2020.6.20
chardet                         3.0.4
decorator                       4.4.2
django-robots                   4.0
docutils                        0.16
idna                            2.10
kitchen                         1.2.6
numpy                           1.19.1
Pillow                          7.2.0
pip                             19.0.3
Pygments                        2.6.1
PyPubSub                        3.3.0
pywin32                         228
requests                        2.24.0
robot                           20071211
robotframework                  3.2.1
robotframework-appiumlibrary    1.5.0.4
robotframework-databaselibrary  1.2.4
robotframework-pythonlibcore    2.1.0
robotframework-requests         0.7.1
robotframework-ride             1.7.3.1
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary  3.3.1
robotframeworklexer             1.1
selenium                        3.141.0
setuptools                      40.8.0
six                             1.15.0
urllib3                         1.25.10
wxPython                        4.0.7.post2
You are using pip version 19.0.3, however version 20.2.2 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.

Python that I chosen is 3.7.4

However, I need to executes the script, which it should be execute normally. However, I found that it caught error

Traceback (most recent call last):
  File "d:\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "d:\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "D:\Scripts\robot.exe\__main__.py", line 5, in <module>
ModuleNotFoundError: No module named 'robot'

that I don't understand that cause of error. I have already got robot files as well

4
  • robot.exe is the name of the application, not for a folder. I don't understand why the program catch robot.exe into path? Commented Aug 25, 2020 at 6:45
  • Because robot.exe is made for an underlying Python file in which the ModuleNotFoundError happens. Commented Aug 25, 2020 at 6:55
  • How do you start the Robot Framework script? python -m robot? Commented Aug 25, 2020 at 17:42
  • Yes, when I start, i caught error Traceback (most recent call last): File "D:\lib\runpy.py", line 193, in run_module_as_main "main", mod_spec) File "D:\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "D:\lib\site-packages\robot__main_.py", line 25, in <module> from robot import run_cli ImportError: cannot import name 'run_cli' from 'robot' (D:\lib\site-packages\robot_init_.py) Commented Aug 26, 2020 at 0:35

2 Answers 2

0

Have you found a solution yet? I doubt if your command to execute robot is correct. robot <Path to robot file> will execute it. for example robot Tests/my_robot_test.robot and if you have tags assigned, you can run specific tag test cases with robot -i <tag_id> Tests/my_robot_test.robot

Sign up to request clarification or add additional context in comments.

Comments

0

Solution for anyone looking in the future:

I've noticed you have a package called robot installed and Python for whatever reason checks that first and does not look after the executable from the package robotframework.

So just python -m pip uninstall robot and everything should work again.

Or at least that fixed it for me.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.