On Tue, 31 Jul 2012, Maarten Derickx wrote:
but if I try with secure=True, I got
Failed to load application: cannot import name crypto
Your error is probably longer then the above right? Can you post the full
traceback. It might help to get to know where it is trying to import the
name "crypto" from.
It is long, but as you asked:
----
Executing twistd --pidfile="sage_notebook.sagenb/sagenb.pid" -ny
"sage_notebook.sagenb/twistedconf.tac"
Unhandled Error
Traceback (most recent call last):
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/application/app.py",
line 652, in run
runApp(config)
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/scripts/twistd.py",
line 23, in runApp
_SomeApplicationRunner(config).run()
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/application/app.py",
line 386, in run
self.application = self.createOrGetApplication()
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.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
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/application/app.py",
line 462, in getApplication
application = service.loadApplication(filename, style, passphrase)
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/application/service.py",
line 405, in loadApplication
application = sob.loadValueFromFile(filename, 'application',
passphrase)
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/persisted/sob.py",
line 210, in loadValueFromFile
exec fileObj in d, d
File "sage_notebook.sagenb/twistedconf.tac", line 83, in <module>
s =
strports.service('ssl:1243:interface=:privateKey=/home/maintainer/.sage/notebook/private.pem:certKey=/home/maintainer/.sage/notebook/public.pem',
site)
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/application/strports.py",
line 77, in service
endpoints._serverFromStringLegacy(reactor, description, default),
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/internet/endpoints.py",
line 873, in _serverFromStringLegacy
nameOrPlugin, args, kw = _parseServer(description, None, default)
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/internet/endpoints.py",
line 864, in _parseServer
return (endpointType.upper(),) + parser(factory, *args[1:], **kw)
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/internet/endpoints.py",
line 671, in _parseSSL
from twisted.internet import ssl
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/internet/ssl.py",
line 23, in <module>
from OpenSSL import SSL
File
"/usr/local/sage-5.1/local/lib/python2.7/site-packages/pyOpenSSL-0.12-py2.7-linux-x86_64.egg/OpenSSL/__init__.py",
line 36, in <module>
from OpenSSL import crypto
exceptions.ImportError: cannot import name crypto
Failed to load application: cannot import name crypto
---------------------------------------------------------------------------
error Traceback (most recent call
last)
/usr/local/sage-5.1/devel/sagenb-ldap/<ipython console> in <module>()
/usr/local/sage-5.1/devel/sagenb-ldap/sagenb/notebook/notebook_object.pyc
in __call__(self, *args, **kwds)
217 """
218 def __call__(self, *args, **kwds):
--> 219 return self.notebook(*args, **kwds)
220
221 notebook = run_notebook.notebook_run
/usr/local/sage-5.1/devel/sagenb-ldap/sagenb/notebook/run_notebook.pyc in
notebook_run(self, directory, port, interface, port_tries, secure, reset,
accounts, openid, server_pool, ulimit, timeout, upload, automatic_login,
start_path, fork, quiet, server, profile, subnets, require_login,
open_viewer, address)
614 os.chdir(cwd)
615 if e == 256:
--> 616 raise socket.error
617
618 def get_admin_passwd():
----
Did you read: https://github.com/rmartinjak/sagenb/tree/ldap
to be precise the part about SSL Support? The things said there might also
help.
At least "import ssl" says nothing at all, which I think is what it
should.
For another question, I will try group sage-notebook.
--
Jori Mäntysalo
--
--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org