python - Heroku using django and twisted -
python - Heroku using django and twisted -
i want set working app on heroku. application using django , chat based on twisted websockets. don't know it's approach installed twisted via heroku bash, when want run chatserver.py have exception because twisted module requires openssl not installed on env.
so question, how install twisted work websocket on heroku?
update when run twistd -n -y chatserver.py:
unhandled error traceback (most recent phone call last): file "/app/.heroku/python/lib/python2.7/site-packages/twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 652, in run runapp(config) file "/app/.heroku/python/lib/python2.7/site-packages/twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/scripts/twistd.py", line 23, in runapp _someapplicationrunner(config).run() file "/app/.heroku/python/lib/python2.7/site-packages/twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 386, in run self.application = self.createorgetapplication() file "/app/.heroku/python/lib/python2.7/site-packages/twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 451, in createorgetapplication application = getapplication(self.config, passphrase) --- <exception caught here> --- file "/app/.heroku/python/lib/python2.7/site-packages/twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/application/app.py", line 462, in getapplication application = service.loadapplication(filename, style, passphrase) file "/app/.heroku/python/lib/python2.7/site-packages/twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/application/service.py", line 405, in loadapplication application = sob.loadvaluefromfile(filename, 'application', passphrase) file "/app/.heroku/python/lib/python2.7/site-packages/twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/persisted/sob.py", line 210, in loadvaluefromfile exec fileobj in d, d file "chatserver.py", line 37, in <module> twisted.web.websockets import websocketsresource, lookupprotocolforfactory file "/app/.heroku/python/lib/python2.7/site-packages/twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/web/websockets.py", line 28, in <module> twisted.protocols.tls import tlsmemorybioprotocol file "/app/.heroku/python/lib/python2.7/site-packages/twisted-13.1.0-py2.7-linux-x86_64.egg/twisted/protocols/tls.py", line 40, in <module> openssl.ssl import error, zeroreturnerror, wantreaderror exceptions.importerror: no module named openssl.ssl failed load application: no module named openssl.ssl
so when seek install openssl command: pip install pyopenssl
traceback (most recent phone call last): file "<string>", line 17, in <module> file "/tmp/pip_build_u12732/cryptography/setup.py", line 174, in <module> "test": pytest, file "/app/.heroku/python/lib/python2.7/distutils/core.py", line 111, in setup _setup_distribution = dist = klass(attrs) file "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 260, in __init__ file "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 285, in fetch_build_eggs file "build/bdist.linux-x86_64/egg/pkg_resources.py", line 631, in resolve file "build/bdist.linux-x86_64/egg/pkg_resources.py", line 871, in best_match file "build/bdist.linux-x86_64/egg/pkg_resources.py", line 883, in obtain file "build/bdist.linux-x86_64/egg/setuptools/dist.py", line 335, in fetch_build_egg file "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 595, in easy_install file "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 625, in install_item file "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 822, in install_eggs file "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1028, in build_and_install file "build/bdist.linux-x86_64/egg/setuptools/command/easy_install.py", line 1016, in run_setup distutils.errors.distutilserror: setup script exited error: command 'gcc' failed exit status 1 ---------------------------------------- cleaning up... command python setup.py egg_info failed error code 1 in /tmp/pip_build_u12732/cryptography traceback (most recent phone call last): file "/app/.heroku/python/bin/pip", line 9, in <module> load_entry_point('pip==1.5.6', 'console_scripts', 'pip')() file "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/__init__.py", line 185, in main homecoming command.main(cmd_args) file "/app/.heroku/python/lib/python2.7/site-packages/pip-1.5.6-py2.7.egg/pip/basecommand.py", line 161, in main text = '\n'.join(complete_log) unicodedecodeerror: 'ascii' codec can't decode byte 0xe2 in position 75: ordinal not in range(128)
python django heroku websocket twisted
Comments
Post a Comment