Skip to content

Importing listener 'robotframework_reportportal.listener' failed: ImportError: cannot import name FinishExecutionRQ #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tset-Noitamotua opened this issue Jun 23, 2017 · 2 comments

Comments

@Tset-Noitamotua
Copy link

I am trying to run a simple robot test but get this error

[ ERROR ]
Taking listener 'robotframework_reportportal.listener' into use failed:
Importing listener 'robotframework_reportportal.listener' failed:
ImportError: cannot import name FinishExecutionRQ

Test code in simple_robot_test.robot file

*** Settings ***
Documentation    This is a very simple Robot test!

*** Test Cases ***
001 Simple Log Test Case
    Log    Hello Python!
    Log Many          Robot  Framework  Rules!!!

Test execution command

robot --listener robotframework_reportportal.listener \
--variable RP_UUID:"XXXXXX-XXXX-XXXX-XXXX-XXXXXXXX" \
--variable RP_ENDPOINT:"http://0.0.0.0:8080" \
--variable RP_LAUNCH:"Robot Launch" \
--variable RP_PROJECT:"ROBOT_INTEGRATION" \
-d Results simple_robot_test.robot

Complete output

(ROBOT_2.7) wlad@wlad-VirtualBox:~/_GITHUB/reportportal/robotframework_integration$ robot --listener robotframework_reportportal.listener \
> --variable RP_UUID:"61bbbb1d-cad0-47e3-a783-31dfe0ba70b9" \
> --variable RP_ENDPOINT:"http://0.0.0.0:8080" \
> --variable RP_LAUNCH:"Robot Launch" \
> --variable RP_PROJECT:"ROBOT_INTEGRATION" \
> -d Results simple_robot_test.robot
[ ERROR ] Taking listener 'robotframework_reportportal.listener' into use failed: Importing listener 'robotframework_reportportal.listener' failed: ImportError: cannot import name FinishExecutionRQ
Traceback (most recent call last):
  File "/home/wlad/.virtualenvs/ROBOT_2.7/local/lib/python2.7/site-packages/robotframework_reportportal/listener.py", line 5, in <module>
    from .service import RobotService
  File "/home/wlad/.virtualenvs/ROBOT_2.7/local/lib/python2.7/site-packages/robotframework_reportportal/service.py", line 3, in <module>
    from reportportal_client import (ReportPortalService, FinishExecutionRQ,
PYTHONPATH:
  /home/wlad/.virtualenvs/ROBOT_2.7/bin
  /home/wlad/.virtualenvs/ROBOT_2.7/lib/python2.7
  /home/wlad/.virtualenvs/ROBOT_2.7/lib/python2.7/plat-x86_64-linux-gnu
  /home/wlad/.virtualenvs/ROBOT_2.7/lib/python2.7/lib-tk
  /home/wlad/.virtualenvs/ROBOT_2.7/lib/python2.7/lib-old
  /home/wlad/.virtualenvs/ROBOT_2.7/lib/python2.7/lib-dynload
  /usr/lib/python2.7
  /usr/lib/python2.7/plat-x86_64-linux-gnu
  /usr/lib/python2.7/lib-tk
  /home/wlad/.virtualenvs/ROBOT_2.7/local/lib/python2.7/site-packages
  /home/wlad/_GITHUB/catinabox
  /home/wlad/.virtualenvs/ROBOT_2.7/lib/python2.7/site-packages
==============================================================================
Simple Robot Test :: This is a very simple Robot test!                        
==============================================================================
001 Simple Log Test Case                                              | PASS |
------------------------------------------------------------------------------
Simple Robot Test :: This is a very simple Robot test!                | PASS |
1 critical test, 1 passed, 0 failed
1 test total, 1 passed, 0 failed
==============================================================================
Output:  /home/wlad/_GITHUB/reportportal/robotframework_integration/Results/output.xml
Log:     /home/wlad/_GITHUB/reportportal/robotframework_integration/Results/log.html
Report:  /home/wlad/_GITHUB/reportportal/robotframework_integration/Results/report.html
@frizzby
Copy link
Collaborator

frizzby commented Jun 25, 2017

Hi,
It seems you installed agent-Python-RobotFramework from pypi. Latest version in pypi is 2.5.4 which has invalid dependency spec.
For workaround pls install directly from github for now:
pip install git+https://github.com/reportportal/agent-Python-RobotFramework.git

You also see that six package is missing. So install it: pip install six.
This is fixed in 7ae7c4a.

We will publish new 3.0 version to pypi when PR #11 and #12 are merged.

@Tset-Noitamotua
Copy link
Author

Indeed, installing from repo with
pip install git+https://github.com/reportportal/agent-Python-RobotFramework.git did the trick.

Thank you @frizzby !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants