question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Locust failed to launch if installed from latest revision

See original GitHub issue

Describe the bug

Locust failed to launch if being installed from the latest master commit (b2721592075676b87f62923b3936161619c230ec). Previous revision works just fine (3db9724d765b5f7b15e472f164e4d5e131bca14f).

Expected behavior

Correct launch

Actual behavior

  File ".../python3.9/site-packages/locust/user/users.py", line 108, in User
    environment: Environment = None
NameError: name 'Environment' is not defined

Steps to reproduce

  1. Install locust from b2721592075676b87f62923b3936161619c230ec revision
  2. Run simple test (locustfile.py):
from locust import HttpUser, task, constant


class TestUser(HttpUser):
    host = "https://google.com"
    wait_time = constant(1)

    @task
    def test_query(self):
        self.client.get("/search?q=test")

Environment

  • OS: macOS 10.15.7
  • Python version: 3.9.0
  • Locust version: 1.4.1 (b2721592075676b87f62923b3936161619c230ec)
  • Locust command line that you ran: locust --headless -u 1 -r 1 --run-time 5s

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
andrii-rymarcommented, Jan 21, 2021

Yep, works fine now. Thanks 😃

0reactions
cyberwcommented, Jan 21, 2021

Good! Marking as invalid because it was never in a release…

Read more comments on GitHub >

github_iconTop Results From Across the Web

Installing locust.io error (failed with exit status 2)
from the Locust docs: On Windows, running pip install locustio might fail depedning on if you have a build environment set up correctly....
Read more >
Installation — Locust 2.14.0 documentation
Install the package (check the wiki if the installation fails) ... If you need the latest and greatest version of Locust and cannot...
Read more >
Setup Locust (Python/load testing) on Windows
I got this warning when running the command 'locust –help' to test my setup. The warning comes with a helpful recommendation to install...
Read more >
0 1 - Get Started with Locust : Setup On Windows - YouTube
Mercurytours site is now - http://demo.guru99.com/test/newtours/index.phpVisit: http://qamilestone.comPlaylist: Get Started with ...
Read more >
Performance and Load Testing using Locust - PFLB
Table of Contents ; 1. What is Locust ; 2. Installation ; 3. Starting with Locust ; 3.1. How to run a load...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found