Open StephenFiser opened 5 years ago
Please show the code and the conditions for reproducing this error.
Having same problem. In my instance I am using a method in an external python module and this is in a Rails controller. After one call is made, I cannot make another call. The second call will hang.
require 'pycall'
PyCall.init('python3')
PyCall.sys.path.append File.dirname("PATH_TO_MODULE")
def test_python
mod = PyCall.import_module('MODULE_NAME')
val = mod.SOME_MODULE_METHOD()
render json:
end
I have the same problem when I use https://github.com/yohasebe/ruby-spacy (which is based on PyCall).
It works when I call Spacy::Language.new("en_core_web_sm")
in the rails console. When I call it from the server process (puma) or inside a background job (I tried sidekiq and https://github.com/basecamp/solid_queue) the worker just stuck and the only way i found to unstuck it is to kill the process.
I'm having the same issue. My Rails app hangs forever when on eager_load = false. The line of code that is doing it is:
PyCall.sys.path.append('./app/lib/python_helpers')
Its on a initializer.
My app is very simple, and it freezes just by having this line.
I'm getting the following error the first time that
sklearn
is imported:I'm not a python dev, but it seems semaphore has something to do with parallel processing.
When I'm in a rails console, I can run my code without issues (still get the warning). In the web application, it runs once, then it hangs. If I navigate away from the page where it runs, the app is fine. If I come back to the previous page, it crashes entirely. Would love some help!