Closed denny64 closed 5 years ago
Had the same issue when trying to run a couple of UI scenarios with locust.
It's a problem of crayons
library: __str__
method returned function
instead of a string.
Maybe monkeypatching can help you. But, this is a reason for library to switch to some alternative like colorama, as crayons uses it under the hood.
@denny64 @MarkBrook please provide some code examples! So I will be able to reproduce
@SergeyPirogov alright, you can try this to reproduce.
Steps:
Install locust first (pip3 install locust
).
Try to execute some simple scenario. Example:
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from locust import TaskSet, task, Locust
class UserBehaviour(TaskSet):
@task
def open_home_page(self):
driver_manager = ChromeDriverManager()
driver = webdriver.Chrome(
# works when you hard-code a path (e.g. /home/user/.wdm/chromedriver/75.0.3770.90/linux64/chromedriver)
executable_path=driver_manager.install()
)
driver.get('https://github.com')
class User(Locust):
min_wait = 1000
max_wait = 10000
task_set = UserBehaviour
3. Run `locust -f my_locustfile.py`
4. Set 5 users to simulate and 1 hatch rate on `http://localhost:8089/`
5. Check console output
Getting this error on scrapinghub. Works okay locally. Any ideas?