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

Not working on app engine #37

Closed
jsphpl opened this issue Nov 4, 2015 · 3 comments
Closed

Not working on app engine #37

jsphpl opened this issue Nov 4, 2015 · 3 comments

Comments

@jsphpl
Copy link
Contributor

jsphpl commented Nov 4, 2015

When trying to use smart_open in App Engine, i get the following error:

from subprocess import _args_from_interpreter_flags
ImportError: cannot import name _args_from_interpreter_flags

Loosely translated through google, this reads as there is no multiprocessing on app engine, see

Any ideas how to tackle this? App Engine is very interesting platform for smart_open due to its lack of local disk access and limited memory.

@piskvorky
Copy link
Owner

Very interesting use case, thanks for reporting!

Yes, if multiprocessing breaks smart_open on App Engine, we should make it optional. Multiprocessing is only needed in a few places, it's optional and not critical in any way for smart_open to work.

Can you add a fix for this in a pull request, @jsphpl ?

I'm thinking some dynamic (runtime) check to see if multiprocessing is available (catch ImportError); if yes, proceed as normal. If not, do a warnings.warn to notify the user that he's running a gelded version of smart_open, but otherwise continue working.

@jsphpl
Copy link
Contributor Author

jsphpl commented Nov 5, 2015

Okay thank you, that sounds promising - i'll look at the code and see what i can do.

@jsphpl
Copy link
Contributor Author

jsphpl commented Dec 18, 2015

Fixed by #39. Tests still missing (see #47)

@jsphpl jsphpl closed this as completed Dec 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants