Он отлично работает на Python 3.11.8, но теперь я пытаюсь перейти на Python 3.12.4 и не могу отладить, потому что он зависает на линии с импортом locust. Совместимость с Gevent в настройках PyCharm отмечена. И у меня нет никаких исключений при запуске скрипта.
Вот вывод ошибки:
Код: Выделить всё
Traceback (most recent call last):
File "", line 1360, in _find_and_load
File "", line 1331, in _find_and_load_unlocked
File "", line 935, in _load_unlocked
File "", line 995, in exec_module
File "", line 488, in _call_with_frames_removed
File "/path/to/project/.venv/lib/python3.12/site-packages/locust/__init__.py", line 19, in
from .contrib.fasthttp import FastHttpUser
File "", line 471, in _lock_unlock_module
File "", line 365, in acquire
KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py", line 1551, in _exec
pydev_imports.execfile(file, globals, locals) # execute the script
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/path/to/project/src/scripts/locustfile.py", line 3, in
import locust
File "", line 1357, in _find_and_load
File "", line 421, in __exit__
File "", line 376, in release
RuntimeError: cannot release un-acquired lock
python-BaseException
Подробнее здесь: https://stackoverflow.com/questions/787 ... ython-3-12