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

locust 2.13.0 failed to run #2263

Closed
willysr opened this issue Nov 27, 2022 · 6 comments
Closed

locust 2.13.0 failed to run #2263

willysr opened this issue Nov 27, 2022 · 6 comments
Labels

Comments

@willysr
Copy link

willysr commented Nov 27, 2022

Describe the bug

I tried to build locust 2.13.0 on slackware-current but it failed to run with the following error message

locust 
Traceback (most recent call last):
  File "/usr/bin/locust", line 33, in <module>
    sys.exit(load_entry_point('locust==2.13.0', 'console_scripts', 'locust')())
  File "/usr/bin/locust", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/usr/lib64/python3.9/importlib/metadata.py", line 86, in load
    module = import_module(match.group('module'))
  File "/usr/lib64/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 972, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib64/python3.9/site-packages/locust/__init__.py", line 18, in <module>
    from .contrib.fasthttp import FastHttpUser
  File "/usr/lib64/python3.9/site-packages/locust/contrib/fasthttp.py", line 24, in <module>
    from locust.env import Environment
  File "/usr/lib64/python3.9/site-packages/locust/env.py", line 16, in <module>
    from .runners import Runner, LocalRunner, MasterRunner, WorkerRunner
  File "/usr/lib64/python3.9/site-packages/locust/runners.py", line 43, in <module>
    import psutil
  File "/usr/lib64/python3.9/site-packages/psutil/__init__.py", line 102, in <module>
    from . import _pslinux as _psplatform
  File "/usr/lib64/python3.9/site-packages/psutil/_pslinux.py", line 87, in <module>
    PAGESIZE = cext_posix.getpagesize()
AttributeError: module 'psutil._psutil_posix' has no attribute 'getpagesize'

i have psutil 5.9.4, which is the latest version

Expected behavior

locust run normally

Actual behavior

locust failed to run

Steps to reproduce

build all dependencies of locust and locust 2.13.0

Environment

  • OS: Slackware-Current
  • Python version: 3.9.15
  • Locust version: 2.13.0
  • Locust command line that you ran: locust
@willysr willysr added the bug label Nov 27, 2022
@cyberw
Copy link
Collaborator

cyberw commented Nov 27, 2022

Huh. That's strange. Can you try an older version of psutil just in case? Otherwise my guess is that your installation is corrupt somehow... Its not really a locust thing, as it happens directly on import of psutil.

@willysr
Copy link
Author

willysr commented Nov 27, 2022

i think it's because of this commit
giampaolo/psutil@25a2ab6

@willysr
Copy link
Author

willysr commented Nov 27, 2022

@cyberw which version of psutil did you use currently now?

@cyberw
Copy link
Collaborator

cyberw commented Nov 29, 2022

I have been using 5.9.1, but now updated to latest (5.9.4) now and both worked for me.

@willysr
Copy link
Author

willysr commented Nov 29, 2022

that's strange. I'm sure that my psutil installation is ok since i tested other code and it's working just fine

@cyberw
Copy link
Collaborator

cyberw commented Nov 29, 2022

very strange...

@willysr willysr closed this as completed Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants