You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Importing pillow and opening an image make a sinatra server get stuck (seems like the python function never return).
I don't really know what are the details related to this problem, I can only say it happened both on linux and mac, that it seams to be related to usage of the pillow library, and also happen when using fastai (which rely on pillow for opening images). I have tried different implementation (fastai, opening the image with pillow by hand) but still get this problem. Not using fastai and pillow doesn't create any problem and everything runs fines.
I have tried both with and without PyCall.without_gvl.
I don't know if the same troubles happen when using directly the ruby interpreter. Sadly, I don't have much time to investigate.
Steps to reproduce
make a function calling pillow:
def cally():
print("hey")
sub()
print("ok")
def sub():
// Do some naugthy stuff with pillow
Call the cally function from sinatra (ruby) in any get or post request.
The function sub seams to never return. ("ok" is never displayed, but any print added to sub will be displayed, until the function sub returns)
I have no idea where it comes from, and feel actually stupid that pytorch is working but not the pillow library. 🤣
Expected behavior
"ok" should be printed and then ruby should get the hand back
Actual behavior
Get stup inside python in master and 1.3.0-dev. Segfault with older versions.
System configuration
Ruby version: 2.6.3 with rbenv Sinatra version: 2.0.5 Server version: use bundle exec rackup with default configuration (i.e. WEBrick)
The text was updated successfully, but these errors were encountered:
Importing pillow and opening an image make a sinatra server get stuck (seems like the python function never return).
I don't really know what are the details related to this problem, I can only say it happened both on linux and mac, that it seams to be related to usage of the pillow library, and also happen when using fastai (which rely on pillow for opening images). I have tried different implementation (fastai, opening the image with pillow by hand) but still get this problem. Not using fastai and pillow doesn't create any problem and everything runs fines.
I have tried both with and without
PyCall.without_gvl
.I don't know if the same troubles happen when using directly the ruby interpreter. Sadly, I don't have much time to investigate.
Steps to reproduce
make a function calling pillow:
Call the cally function from sinatra (ruby) in any get or post request.
The function sub seams to never return. ("ok" is never displayed, but any print added to sub will be displayed, until the function sub returns)
I have no idea where it comes from, and feel actually stupid that pytorch is working but not the pillow library. 🤣
Expected behavior
"ok" should be printed and then ruby should get the hand back
Actual behavior
Get stup inside python in master and 1.3.0-dev. Segfault with older versions.
System configuration
Ruby version: 2.6.3 with rbenv
Sinatra version: 2.0.5
Server version: use bundle exec rackup with default configuration (i.e. WEBrick)
The text was updated successfully, but these errors were encountered: