If you are using PyCharm, the issue might be solved by enabling Gevent compatibility. You can do this by navigating to Settings/Preferences > Build, Execution, Deployment > Python Debugger
and then ticking the checkbox Gevent compatible
.
from: https://stackoverflow.com/questions/62250160/uwsgi-runtimeerror-cannot-release-un-acquired-lock