You can add a warning to the file (based on your error, I am giving the 
file path):

/usr/lib64/python2.7/site-packages/sagenb/data/sage/html/login.html

Find the lines

<div id="sign-in-box">
    <h2>Sign into the Sage Notebook v{{ sage_version }}</h2>

and append the following warning below it
<span style="color: red;">Note that the user name is case sensitive.</span>

You can also modify the lines:
            {% if username_error %}
            <span style="color:red">{{ gettext('Error') }}: </span>{{ 
gettext('Username is not in the system') }}

and modify the error to be like

gettext('Username is not in the system. Note that the username is case 
sensitive')



On Thursday, July 24, 2014 8:12:04 PM UTC+8, [email protected] wrote:
>
>  Is it possible to patch Notebook somehow to make it show the 
> clear error message (like "User does not exist.") and a hint (somethink 
> like "Please check the upper case letters in login name" or "Please 
> note that Sage Notebook distinguishes between lower case and upper case 
> letters in login name")? 
>
>   Regards, 
>     Vladimir 
>   
>
> On Tue, 22 Jul 2014 13:59:35 -0700 (PDT) 
> Emmanuel Charpentier <[email protected] <javascript:>> wrote: 
>
> > See below. 
> > 
> > Le mardi 22 juillet 2014 19:31:49 UTC+2, [email protected] a écrit : 
> > > 
> > >  Hello! 
> > >   Today one of my students told me about the problems he 
> > > experiences trying to login into Sage Notebook server. In short, 
> > > the problem was that he entered his login name with the first 
> > > letter in upper case. I was surprised that Notebook distinguishes 
> > > between the names with upper case and lower case letters, since it 
> > > is usually ignored for logins everywhere. 
> > > 
> > 
> > Huh ? That happens on systems trying to emulate Windows' behaviour. 
> > Grownups' system are usually Unix-based and therefore case-sensitive. 
> > And Sage is *very* Unix-based (running a Unix VM or a Unix-like layer 
> > (Cygwin) are currently the *only* way torun it under windows (and 
> > only the first has reasonable behavior, notwithstanding the heroic 
> > eforts of the development team...)).   
> >   
> > 
> > >   However, what is worse, Sage Notebook does not give any message 
> > > about incorrect (non-existent in this case) login name - just and 
> > > "Error 500" screen. 
> > > 
> > 
> > There, you have a point ... :-) The error message below, however, 
> > *hints at the problem in the lines that read : 
> > "line 522, in _user raise LookupError("no user '{}'".format 
> > (username)) exceptions.LookupError: no user 'V_2e' " 
> > 
> > HTH, 
> > 
> > -- 
> > Emmanuel Charpentier 
> > 
> > 
> >   Meanwhile in the console log I can see the following message: 
> > > 
> > > ############################################ 
> > > 
> > > 2014-07-22 20:01:15+0300 [-] WSGI application error 
> > >         Traceback (most recent call last): 
> > >           File 
> > > "/usr/lib64/python2.7/site-packages/twisted/python/threadpool.py", 
> > > line 196, in _worker result = context.call(ctx, function, *args, 
> > > **kwargs) File 
> > > "/usr/lib64/python2.7/site-packages/twisted/python/context.py", 
> > > line 118, in callWithContext return self.currentContext 
> > > ().callWithContext(ctx, func, *args, **kw) File 
> > > "/usr/lib64/python2.7/site-packages/twisted/python/context.py", 
> > > line 81, in callWithContext return func(*args,**kw) File 
> > > "/usr/lib64/python2.7/site-packages/twisted/web/wsgi.py", line 332, 
> > > in run self.reactor.callFromThread(wsgiError, self.started, 
> > > *exc_info()) 
> > >         --- <exception caught here> --- 
> > >           File 
> > > "/usr/lib64/python2.7/site-packages/twisted/web/wsgi.py", line 315, 
> > > in run appIterator = self.application(self.environ, 
> > > self.startResponse) File 
> > > "/usr/lib64/python2.7/site-packages/flask/app.py", line 1836, in 
> > > __call__ return self.wsgi_app(environ, start_response) File 
> > > "/usr/lib64/python2.7/site-packages/flask/app.py", line 1820, in 
> > > wsgi_app response = self.make_response(self.handle_exception(e)) 
> > > File "/usr/lib64/python2.7/site-packages/flask/app.py", line 1403, 
> > > in handle_exception reraise(exc_type, exc_value, tb) File 
> > > "/usr/lib64/python2.7/site-packages/flask/app.py", line 1817, in 
> > > wsgi_app response = self.full_dispatch_request() File 
> > > "/usr/lib64/python2.7/site-packages/flask/app.py", line 1477, in 
> > > full_dispatch_request rv = self.handle_user_exception(e) File 
> > > "/usr/lib64/python2.7/site-packages/flask/app.py", line 1381, in 
> > > handle_user_exception reraise(exc_type, exc_value, tb) File 
> > > "/usr/lib64/python2.7/site-packages/flask/app.py", line 1475, in 
> > > full_dispatch_request rv = self.dispatch_request() File 
> > > "/usr/lib64/python2.7/site-packages/flask/app.py", line 1461, in 
> > > dispatch_request return self.view_functions[rule.endpoint] 
> > > (**req.view_args) File 
> > > 
> "/usr/lib64/python2.7/site-packages/sagenb/flask_version/authentication.py", 
>
> > > 
> > > line 42, in login U = g.notebook.user_manager().user(username) File 
> > > "/usr/lib64/python2.7/site-packages/sagenb/notebook/user_manager.py", 
> > > line 112, in user return self._user(username) File 
> > > "/usr/lib64/python2.7/site-packages/sagenb/notebook/user_manager.py", 
> > > line 522, in _user raise LookupError("no user '{}'".format 
> > > (username)) exceptions.LookupError: no user 'V_2e' 
> > > 
> > > ############################################ 
> > > 
> > >   Vladimir 
> > > 
> > > ----- 
> > >  <[email protected] <javascript:>> 
> > > 
> > 
>
>
>
> ----- 
>  <[email protected] <javascript:>> 
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to