Sorry for the noise. With this modification, the notebook server runs but 
at some unexpected moment it stops. I saw these error messages in log, 
maybe related:


Apr 24 14:10:08 sage-mtm saged.mtm[14139]: 2017-04-24T14:10:08+0200 [-] 
WSGI application error 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011Traceback (most recent call 
last): 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/python/threadpool.py",
 
line 262, in <lambda> 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    inContext.theWork = 
lambda: context.call(ctx, func, *args, **kw) 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/python/context.py",
 
line 118, in callWithContext 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    return 
self.currentContext().callWithContext(ctx, func, *args, **kw) 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/python/context.py",
 
line 83, in callWithContext 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    self.contexts.pop() 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/web/wsgi.py", 
line 521, in run 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    self.started = True 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011--- <exception caught here> 
--- 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/web/wsgi.py", 
line 499, in run 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    self.write(elem) 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/web/wsgi.py", 
line 454, in write 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    self.reactor, wsgiWrite, 
self.started) 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/internet/threads.py",
 
line 122, in blockingCallFromThread 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    result.raiseException() 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File "<string>", line 2, 
in raiseException 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011     
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011exceptions.AttributeError: 
'NoneType' object has no attribute 'write' 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: 2017-04-24T14:10:08+0200 [-] 
Unhandled Error 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011Traceback (most recent call 
last): 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/application/app.py",
 
line 390, in startReactor 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    self.config, oldstdout, 
oldstderr, self.profiler, reactor) 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/application/app.py",
 
line 311, in runReactorWithLogging 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    reactor.run() 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/internet/base.py",
 
line 1194, in run 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    self.mainLoop() 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/internet/base.py",
 
line 1203, in mainLoop 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    self.runUntilCurrent() 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011--- <exception caught here> 
--- 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/internet/base.py",
 
line 798, in runUntilCurrent 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011    f(*a, **kw) 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/web/wsgi.py", 
line 509, in wsgiError 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011 
   self.request.loseConnection() 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011  File 
"/usr/local/sage-7.6/local/lib/python2.7/site-packages/twisted/web/http.py", 
line 1345, in loseConnection 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011 
   self.channel.loseConnection() 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011exceptions.AttributeError: 
'NoneType' object has no attribute 'loseConnection' 
Apr 24 14:10:08 sage-mtm saged.mtm[14139]: #011



El lunes, 24 de abril de 2017, 20:32:08 (UTC+2), Enrique Artal escribió:
>
> Not sure either, but I changed the file. Anyway, probably the issue had to 
> do with the number of open files. I added the following lines in 
> limits.conf:
> root soft nofile 655360 
> sage soft nofile 655360 
> root hard nofile 655360 
> sage hard nofile 655360
>
> (sage is the user owning sage notebooks). After a reboot the 7.6 notebooks 
> work OK.
>
>
> El jueves, 20 de abril de 2017, 17:33:36 (UTC+2), Samuel Lelievre escribió:
>>
>> Not sure if this is related, but one thing that goes wrong with
>> the upgrade to IPython 5.0 is that multiline output gets an
>> extraneous blank line, for example instead of
>>
>>     sage: identity_matrix(2)
>>     [1 0]
>>     [0 1]
>>
>> we get
>>
>>     sage: identity_matrix(2)
>>
>>     [1 0]
>>     [0 1]
>>
>> This is solved in IPython 5.3 but Sage has not upgraded to
>> that version yet. You can fix this on your installation by editing
>> the "prompts.py" file located at (from your SAGE_ROOT):
>>
>>     local/lib/python/site-packages/IPython/terminal/prompts.py
>>
>> and replacing the definition of the RichPromptDisplayHook class
>> by the version at
>>
>>
>> https://github.com/takluyver/ipython/blob/83d273e24b28b9c06f0fa4f5bf90581db7c29be8/IPython/terminal/prompts.py
>>
>> ie
>>
>> #####
>> class RichPromptDisplayHook(DisplayHook):
>>     """Subclass of base display hook using coloured prompt"""
>>     def write_output_prompt(self):
>>         sys.stdout.write(self.shell.separate_out)
>>         # If we're not displaying a prompt, it effectively ends with a 
>> newline,
>>         # because the output will be left-aligned.
>>         self.prompt_end_newline = True
>>
>>         if self.do_full_cache:
>>             tokens = self.shell.prompts.out_prompt_tokens()
>>             prompt_txt = ''.join(s for t, s in tokens)
>>             if prompt_txt and not prompt_txt.endswith('\n'):
>>                 # Ask for a newline before multiline output
>>                 self.prompt_end_newline = False
>>
>>             if self.shell.pt_cli:
>>                 self.shell.pt_cli.print_tokens(tokens)
>>             else:
>>                 sys.stdout.write(prompt_txt)
>> #####
>>
>> In case this extra blank line is interpreted somehow
>> as something returning None, this might explain why
>> you get the error message you quote:
>>
>>     TypeError: 'NoneType' object is not iterable
>>
>> Just a wild guess, maybe worth a try...
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to