I guess I've forgotten to mention that sage works when the directoryname 
has the suffix *.sagenb

so this works: sage: notebook(directory="/home/sage/s.sagenb",interface='') 
this doesn't work: sage: notebook(directory="/home/sage/s",interface='') 

When the given directory doesn't exist, one is created, in either case with 
the suffix *.sagenb. I think, when twisted should get started it doesn't 
get the *.sagenb suffix in the second case.
Liebe Grüße aus dem nassen Seewinkel/greetings
Andre

On Tuesday, November 27, 2012 8:51:08 PM UTC+1, KnS wrote:
>
> And, let me add one more observation: 
>
> The problem is that although sage prompts password for setting up admin 
> account on the nb server, I am afraid it is not doing it! For instance, 
> there is no folder called "admin" in the directory specified. 
>
> Apologies for not writing up one single mail.
>
> ~KnS
>
>
> On Wed, Nov 28, 2012 at 1:14 AM, Kannappan Sampath 
> <[email protected]<javascript:>
> > wrote:
>
>>
>> On Wed, Nov 28, 2012 at 12:27 AM, Jason Grout 
>> <[email protected]<javascript:>
>> > wrote:
>>
>>> On 11/23/12 3:19 PM, Andre, der Besonnene wrote:
>>>
>>>>   When I start a notebook without giving a directory parameter
>>>> everything works fine. But when I try to add a directory parameter sage
>>>> refuses to start a webinterface server:
>>>>
>>>> sage: notebook(directory="/home/**sage/s",interface='')
>>>> ..
>>>> Executing twistd  --pidfile="s/sagenb.pid" -ny 
>>>> "s.sagenb/twistedconf.tac"
>>>> /\/\/\/\/\/\
>>>> 2012-11-23 21:31:23+0100 [-]   File
>>>> "/opt/sage/sage-5.4.1-linux-**32bit-ubuntu_12.04.1_lts-i686-**
>>>> Linux/local/lib/python2.7/**site-packages/Twisted-12.1.0-**
>>>> py2.7-linux-i686.egg/twisted/**scripts/_twistd_unix.py",
>>>> line 293, in setupEnvironment
>>>> 2012-11-23 21:31:23+0100 [-]     f = open(pidfile,'wb')
>>>> 2012-11-23 21:31:23+0100 [-] IOError: [Errno 2] No such file or
>>>> directory: '/home/sage/s/sagenb.pid'
>>>> ..
>>>>
>>>> I guess the pidfile should be
>>>> /home/sage/s.sagenb/sagenb.**pid,
>>>> /\/\/\/\/\/\/\/\/\/\
>>>>
>>>> Liebe Grüße aus einen nebeligen Seewinkel, regards
>>>> Andre
>>>>
>>>
>>> I've filed a bug here: 
>>> https://github.com/sagemath/**sagenb/issues/116<https://github.com/sagemath/sagenb/issues/116>.
>>>  
>>> Can anyone confirm this?  I don't have a copy of 5.4.1 up yet.
>>>
>>
>> Well, here, when I tried to do this on my machine, sage raises an error 
>> (the socket.error is being triggered). When monitoring the browser (chrome 
>> beta) log from the terminal: 
>>
>> Browser log: 
>> [1146:830] Got cookie response, socket is authorized
>> [1146:830] AUTHORIZED; socket handshake complete
>> [1151:743] HandleOnlineCheck: Starting check
>> [1151:743] HandleOnlineCheck: OK; current state: 3
>> [3439:368] Read port file, port=48650
>> [3439:368] WebSocket connect info: 48650:GfTvpAdQGj+HKZa/
>> [3573:998] Read port file, port=48650
>> [3573:998] WebSocket connect info: 48650:GfTvpAdQGj+HKZa/
>>
>> Here's Sage's complaint (I am running Sage 5.4.1, of course): 
>>
>> **************************************************
>> *                                                *
>> * Open your web browser to http://localhost:8080 *
>> *                                                *
>> **************************************************
>>  Executing twistd  --pidfile="Test_Note_book/sagenb.pid" -ny 
>> "Test_Note_book.sagenb/twistedconf.tac"
>> 2012-11-28 01:07:02+0530 [-] Log opened.
>> 2012-11-28 01:07:02+0530 [-] twistd 12.1.0 
>> (/usr/lib/sagemath/local/bin/python 2.7.3) starting up.
>> 2012-11-28 01:07:02+0530 [-] reactor class: 
>> twisted.internet.epollreactor.EPollReactor.
>> 2012-11-28 01:07:02+0530 [-] Traceback (most recent call last):
>> 2012-11-28 01:07:02+0530 [-]   File "/usr/lib/sagemath/local/bin/twistd", 
>> line 5, in <module>
>> 2012-11-28 01:07:02+0530 [-]     
>> pkg_resources.run_script('Twisted==12.1.0', 'twistd')
>> 2012-11-28 01:07:02+0530 [-]   File 
>> "/usr/lib/sagemath/local/lib/python2.7/site-packages/distribute-0.6.16-py2.7.egg/pkg_resources.py",
>>  
>> line 468, in run_script
>> 2012-11-28 01:07:02+0530 [-]     
>> self.require(requires)[0].run_script(script_name, ns)
>> 2012-11-28 01:07:02+0530 [-]   File 
>> "/usr/lib/sagemath/local/lib/python2.7/site-packages/distribute-0.6.16-py2.7.egg/pkg_resources.py",
>>  
>> line 1201, in run_script
>> 2012-11-28 01:07:02+0530 [-]     execfile(script_filename, namespace, 
>> namespace)
>> 2012-11-28 01:07:02+0530 [-]   File 
>> "/usr/lib/sagemath/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/EGG-INFO/scripts/twistd",
>>  
>> line 14, in <module>
>> 2012-11-28 01:07:02+0530 [-]     run()
>> 2012-11-28 01:07:02+0530 [-]   File 
>> "/usr/lib/sagemath/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/scripts/twistd.py",
>>  
>> line 27, in run
>> 2012-11-28 01:07:02+0530 [-]     app.run(runApp, ServerOptions)
>> 2012-11-28 01:07:02+0530 [-]   File 
>> "/usr/lib/sagemath/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/application/app.py",
>>  
>> line 652, in run
>> 2012-11-28 01:07:02+0530 [-]     runApp(config)
>> 2012-11-28 01:07:02+0530 [-]   File 
>> "/usr/lib/sagemath/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/scripts/twistd.py",
>>  
>> line 23, in runApp
>> 2012-11-28 01:07:02+0530 [-]     _SomeApplicationRunner(config).run()
>> 2012-11-28 01:07:02+0530 [-]   File 
>> "/usr/lib/sagemath/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/application/app.py",
>>  
>> line 390, in run
>> 2012-11-28 01:07:02+0530 [-]     self.postApplication()
>> 2012-11-28 01:07:02+0530 [-]   File 
>> "/usr/lib/sagemath/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/scripts/_twistd_unix.py",
>>  
>> line 230, in postApplication
>> 2012-11-28 01:07:02+0530 [-]     self.startApplication(self.application)
>> 2012-11-28 01:07:02+0530 [-]   File 
>> "/usr/lib/sagemath/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/scripts/_twistd_unix.py",
>>  
>> line 338, in startApplication
>> 2012-11-28 01:07:02+0530 [-]     self.config['pidfile'])
>> 2012-11-28 01:07:02+0530 [-]   File 
>> "/usr/lib/sagemath/local/lib/python2.7/site-packages/Twisted-12.1.0-py2.7-linux-x86_64.egg/twisted/scripts/_twistd_unix.py",
>>  
>> line 293, in setupEnvironment
>> 2012-11-28 01:07:02+0530 [-]     f = open(pidfile,'wb')
>> 2012-11-28 01:07:02+0530 [-] IOError: [Errno 2] No such file or 
>> directory: '/home/knsam/Test_Note_book/sagenb.pid'
>>
>> ---------------------------------------------------------------------------
>> error                                     Traceback (most recent call 
>> last)
>>
>> /home/<ipython console> in <module>()
>>
>> /usr/lib/sagemath/devel/sagenb/sagenb/notebook/notebook_object.pyc in 
>> __call__(self, *args, **kwds)
>>     221     """
>>     222     def __call__(self, *args, **kwds):
>> --> 223         return self.notebook(*args, **kwds)
>>     224 
>>     225     notebook = run_notebook.notebook_run
>>
>> /usr/lib/sagemath/devel/sagenb/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)
>>     626     os.chdir(cwd)
>>     627     if e == 256:
>> --> 628         raise socket.error
>>     629 
>>     630 def get_admin_passwd():
>>
>> error: 
>>  
>>  
>>
>>> Thanks,
>>>
>>> Jason
>>>
>>>
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "sage-support" group.
>>> To post to this group, send email to [email protected]<javascript:>
>>> .
>>> To unsubscribe from this group, send email to sage-support...@**
>>> googlegroups.com <javascript:>.
>>> Visit this group at 
>>> http://groups.google.com/**group/sage-support?hl=en<http://groups.google.com/group/sage-support?hl=en>
>>> .
>>>
>>>
>>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
Visit this group at http://groups.google.com/group/sage-support?hl=en.


Reply via email to