Skip to content
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

No module named 'HTTPLocust' #1054

Closed
ymakkena opened this issue Jul 26, 2019 · 4 comments
Closed

No module named 'HTTPLocust' #1054

ymakkena opened this issue Jul 26, 2019 · 4 comments

Comments

@ymakkena
Copy link

ymakkena commented Jul 26, 2019

[2019-07-26 11:06:51,269] VAM008056/ERROR/stderr: Traceback (most recent call last):
[2019-07-26 11:06:51,269] VAM008056/ERROR/stderr: File "/usr/local/bin/locust", line 10, in
[2019-07-26 11:06:51,269] VAM008056/ERROR/stderr:
[2019-07-26 11:06:51,269] VAM008056/ERROR/stderr: sys.exit(main())
[2019-07-26 11:06:51,269] VAM008056/ERROR/stderr:
[2019-07-26 11:06:51,269] VAM008056/ERROR/stderr: File "/usr/local/lib/python3.7/site-packages/locust/main.py", line 426, in main
[2019-07-26 11:06:51,271] VAM008056/ERROR/stderr:
[2019-07-26 11:06:51,271] VAM008056/ERROR/stderr: docstring, locusts = load_locustfile(locustfile)
[2019-07-26 11:06:51,271] VAM008056/ERROR/stderr:
[2019-07-26 11:06:51,271] VAM008056/ERROR/stderr: File "/usr/local/lib/python3.7/site-packages/locust/main.py", line 393, in load_locustfile
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr:
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr: imported = import_locustfile(locustfile, path)
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr:
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr: File "/usr/local/lib/python3.7/site-packages/locust/main.py", line 365, in import_locustfile
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr:
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr: imported = source.load_module()
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr:
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr: File "", line 407, in _check_name_wrapper
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr: File "", line 907, in load_module
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr: File "", line 732, in load_module
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr: File "", line 265, in _load_module_shim
[2019-07-26 11:06:51,272] VAM008056/ERROR/stderr: File "", line 696, in _load
[2019-07-26 11:06:51,273] VAM008056/ERROR/stderr: File "", line 677, in _load_unlocked
[2019-07-26 11:06:51,273] VAM008056/ERROR/stderr: File "", line 728, in exec_module
[2019-07-26 11:06:51,273] VAM008056/ERROR/stderr: File "", line 219, in _call_with_frames_removed
[2019-07-26 11:06:51,273] VAM008056/ERROR/stderr: File "/Users/yash.makkena/dev/nf2/core/locust/geosite_ips.py", line 1, in
[2019-07-26 11:06:51,273] VAM008056/ERROR/stderr:
[2019-07-26 11:06:51,273] VAM008056/ERROR/stderr: import HTTPLocust, TaskSet, task
[2019-07-26 11:06:51,273] VAM008056/ERROR/stderr:
[2019-07-26 11:06:51,273] VAM008056/ERROR/stderr: ModuleNotFoundError
[2019-07-26 11:06:51,273] VAM008056/ERROR/stderr: :
[2019-07-26 11:06:51,273] VAM008056/ERROR/stderr: No module named 'HTTPLocust'
[2019-07-26 11:06:51,273] VAM008056/ERROR/stderr:

I'm running Python 3.7.4 from Homebrew and Locust version 0.11.0. Any ideas on why this could be an issue? I've tried it with older versions of python, and I've tried reinstalling locust, but every time I try to run a locustfile I get this issue. Any ideas?

@ymakkena ymakkena changed the title No module named 'core' No module named 'HTTPLocust' Jul 26, 2019
@cgoldberg
Copy link
Member

cgoldberg commented Jul 26, 2019

No module named 'HTTPLocust' occurs because there is no such module by that name. It is HttpLocust.

@ymakkena
Copy link
Author

Yeah, I realized that soon after. It has the same issue with HttpLocust, though

@cgoldberg
Copy link
Member

are you importing from the locust package?

from locust import HttpLocust

@ymakkena
Copy link
Author

Yeah I was. But I ended up fixing my issue, I had to delete all my Python 2.7 framework and it's running now. Thank you!

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