kootstra / robotframework-allurereport

This is a library for the Allure Framework and Robot Framework.
MIT License
21 stars 16 forks source link

failed: ModuleNotFoundError: No modu le named 'AllureListener' #2

Open VatthanachaiW opened 7 years ago

VatthanachaiW commented 7 years ago

Hi, I have same error message when call AllureReportLibrary in test.robot. Can your help me to fix this? Thanks you.

OS : Windows 10 Python: 3.6.0 Anaconda: 4.3.0 Robotframework: 3.0.2 AllureReportLibrary: 1.1.1

Error message : PS C:\Users\ai\Documents\RobotProject> python -m robot .\test.robot [ ERROR ] Error in file 'C:\Users\ai\Documents\RobotProject\test.robot': Importing test library 'AllureReportLibrary' failed: ModuleNotFoundError: No modu le named 'AllureListener' Traceback (most recent call last): File "C:\Program Files\Anaconda3\lib\site-packages\AllureReportLibrary__init__.py", line 2, in from AllureListener import *

Source Code : test.robot Settings Library Selenium2Library Library AllureReportLibrary C:\temp

Test Case Hello Google Open Browser http://www.google.co.th firefox

idxn commented 7 years ago

@VatthanachaiW How did you install the library? AllureListener is already included in the package. I'm not sure it relates to Anaconda or not. Have you tried the standard python?

VatthanachaiW commented 7 years ago

thank you for you answer.

I'm just install from command line like this. "pip install robotframework-allurereport"

I think I will clean remove python and try to install it again.

idxn commented 7 years ago

@VatthanachaiW how does it go? is your problem resolved?

ghost commented 6 years ago

I have the same problem in Ubuntu Subsystem for Win10. Importing test library 'AllureReportLibrary' failed: ImportError: No module named 'AllureListener'

VatthanachaiW commented 6 years ago

@idxn Sorry for late answer. the problem are not fix.

idxn commented 6 years ago

emmm do you guys want me to take a look via any desktop sharing software?

ghost commented 6 years ago

@VatthanachaiW what version of python do you use? I have this problem only with Python3, there isn't it with Python2.7.

VatthanachaiW commented 6 years ago

@okgolove my python version is 3.6

ghost commented 6 years ago

@VatthanachaiW as far I know python3 has a new import modules system. Because of this you have described error. I used 2to3 to fast port this lib to python3, also deleted some useless for me code (related to pabot). It works for me. I think I'll fork this repo and will commit my changes to it, but a little bit later.

VatthanachaiW commented 6 years ago

Thank you very much, I'll waiting for you change. 👍

ghost commented 6 years ago

@VatthanachaiW you can try to clone and build whl from here: https://github.com/okgolove/robotframework-allurereport/tree/python3 Use branch "python3". Try to build whl using command: pip3 wheel --no-deps

And install: pip3 install robotframework_allurereport-1.3.0-py3-none-any.whl

VatthanachaiW commented 6 years ago

@okgolove Thank you very much, I'll try.

ornichola commented 6 years ago

@okgolove it's worked for me, thank you!

okgolove commented 6 years ago

Also you can use this: https://pypi.python.org/pypi/allure-robotframework/0.1 It works nice, I've tried.

richhamseth commented 6 years ago

@okgolove https://pypi.python.org/pypi/allure-robotframework/0.1 this link is not working for me Cloning into '0.1'... fatal: repository 'https://pypi.org/pypi/allure-robotframework/0.1/' not found

richhamseth commented 6 years ago

@okgolove-rf @VatthanachaiW https://github.com/okgolove/robotframework-allurereport/tree/python3 Cloning into 'python3'... fatal: repository 'https://github.com/okgolove/robotframework-allurereport/tree/python3/' not found

ghost commented 6 years ago

@richhamseth I've just tried this one: pip3 install allure-robotframework And it works.

richhamseth commented 6 years ago

@okgolove-rf Hi, I have same error message when call AllureReportLibrary in test.robot. Can your help me to fix this? Thanks you.

OS : ubuntu 14 Python: 3.4.0 Robotframework: 3.0.2 AllureReportLibrary: 1.1.1

error message: rich@rich-HP-Pavilion-g6-Notebook-PC:~/Downloads/Marketplace-api$ python3 -m robot.run test.robot [ ERROR ] Error in file '/home/rich/Downloads/Marketplace-api/test.robot': Importing test library 'AllureReportLibrary' failed: ImportError: No module named 'AllureListener' Traceback (most recent call last): File "/home/rich/Downloads/Marketplace-api/AllureReportLibrary.py", line 1, in from AllureListener import AllureListener PYTHONPATH: /usr/local/lib/python3.4/dist-packages/robotremoteserver-1.1-py3.4.egg /usr/lib/python3/dist-packages /usr/lib/python3.4 /usr/lib/python3.4/plat-i386-linux-gnu /usr/lib/python3.4/lib-dynload /home/rich/.local/lib/python3.4/site-packages /usr/local/lib/python3.4/dist-packages Source code: Settings Library Selenium2Library Library AllureReportLibrary //var//lib//Allure

Test Case Hello Google Open Browser http://www.google.co.th firefox

ghost commented 6 years ago

@richhamseth I recommend to replace AllureReportLibrary with allure-robotframework https://github.com/skhomuti/allure-python

richhamseth commented 6 years ago

@okgolove-rf thanks its working

thepoppingone commented 6 years ago

@okgolove-rf Hi, I am facing the same issue as @richhamseth, may I know what do you mean by replacing AllureReportLibary?

I tried to replace it in the robotframework robot file

Library allure-robotframework

and pip install allure-robotframework and the error is still recurring. Any form of help will be useful! Thanks!

 [ ERROR ] Error in file '/Users/<user>/hats/hats-ci/virtualenv/testpage/test_for_mac.robot': Importing test library 'AllureReportLibrary' failed: ModuleNotFoundError: No module named 'AllureListener'
Traceback (most recent call last):
  File "/Users/<user>/anaconda3/lib/python3.6/site-packages/AllureReportLibrary/__init__.py", line 2, in <module>
    from AllureListener import *
PYTHONPATH:
  /Users/<user>/anaconda3/bin
  /Users/<user>/anaconda3/lib/python36.zip
  /Users/<user>/anaconda3/lib/python3.6
  /Users/<user>/anaconda3/lib/python3.6/lib-dynload
  /Users/<user>/anaconda3/lib/python3.6/site-packages
  /Users/<user>/anaconda3/lib/python3.6/site-packages/aeosa
ghost commented 6 years ago

@thepoppingone you don't need to use Library allure-robotframework. You need to run robot with listener option like in documentation: robot --listener allure_robotframework ./my_robot_test

Nall11G commented 5 years ago

@ghost I have tried allure robotframework in Jenkins- Linux server I am facing the same error:

[ ERROR ] Taking listener 'allure_robotframework' into use failed: Importing listener 'allure_robotframework' failed: ModuleNotFoundError: No module named 'allure_robotframework' Traceback (most recent call last): None PYTHONPATH: /usr/local/bin /usr/local/lib/python37.zip /usr/local/lib/python3.7 /usr/local/lib/python3.7/lib-dynload /usr/local/lib/python3.7/site-packages

My Run Command is : robot --listener allure_robotframework TestCases/TestSuite.robot