2

When I run the example feature shown on the pypi behave page the output isn't quite as I'd hoped: The Given, When and Then output messages are printed once in grey, once in colour. Also strange characters are printed at the start of each coloured line.

screenshot:
http://imgur.com/i2VoF

When I run a feature that uses Selenium, in addition to the above I get the message: No handlers could be found for logger "selenium.webdriver.remote.remote_connection"

Any thoughts welcome

3
  • What OS? What console/IDE are you using? Python commandline or IDLE? Can you upload a screenshot to a 3rd party image hosting site (ie imgur.com), and provide a link? Commented May 16, 2012 at 14:43
  • 1
    whoops, sorry, Ubuntu 10.04, GNOME terminal 2.30.2, Python commandline, imgur.com/i2VoF Commented May 16, 2012 at 14:56
  • try this tutorial it will help you blog.fruiapps.com/2012/11/… Commented Nov 30, 2012 at 15:00

1 Answer 1

0

Looks like it's trying to colour the output, but something isn't working (or enabled?). Try running python -m behave -c

From configuration.py: (describing the -c flag)

(('-c', '--no-color'), dict(action='store_false', dest='color',
     help="Disable the use of ANSI color escapes.")),

Screenshot:

screenshot without colouring

If you'd like colouring to work, I suggest reading Print in terminal with colors using Python?

You could try modifying the \behave\formatter\ansi_escapes.py file with the correct ANSI escapes for your terminal - try using the list of escapes on http://pypi.python.org/pypi/colorama

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

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.