Alternative to multiprocessing?
kevinchau opened this issue · 4 comments
kevinchau commented
Having an issue using this on App Engine
ERROR 2015-03-16 21:37:06,549 wsgi.py:263]
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/runtime/wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "/Users/kevinchau/Dev/airfare/main.py", line 9, in <module>
from firebase import firebase
File "/Users/kevinchau/Dev/airfare/lib/firebase/__init__.py", line 3, in <module>
from .async import process_pool
File "/Users/kevinchau/Dev/airfare/lib/firebase/async.py", line 1, in <module>
import multiprocessing
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/__init__.py", line 65, in <module>
from multiprocessing.util import SUBDEBUG, SUBWARNING
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/util.py", line 40, in <module>
from subprocess import _args_from_interpreter_flags
ImportError: cannot import name _args_from_interpreter_flags
INFO 2015-03-16 21:37:06,557 module.py:737] default: "GET /blast HTTP/1.1" 500 -
Is there an alternative to multiprocessing?
javamo commented
I'm having the same issue. Any answer?
puruzio commented
Same issue here. It's surprising to see so few postings about the use of Firebase on Google Appengine on the internet.
javamo commented
@puruzio @kevinchau This library doesn't work in GAE and they still have no plans to do it. The best you can do is to create/reuse a simple wrapper around the REST api (for the methods you need). The library to generate the tokens works well.
idanya commented
If you are not using the async methods you can workaround the issue by disabling the multiprocessing (that's my case...).
class dummy:
def close(self):
pass
def join(self):
pass
def terminate(self):
pass
class DummyProccessing(ModuleType):
def __init__(self):
pass
@staticmethod
def Pool(processes):
return dummy()
sys.modules['firebase.async.process_pool'] = dummy()
sys.modules['multiprocessing'] = DummyProccessing
from firebase import firebase