#15972: IPython ProfileDirError if IPython was never run
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  defect             |       Status:  needs_review
       Priority:  blocker            |    Milestone:  sage-6.2
      Component:  interfaces         |   Resolution:
       Keywords:                     |    Merged in:
        Authors:  John Palmieri      |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:  u/jhpalmieri       |       Commit:
  /ipython-profile-dir               |  53a7d7f6e6bcac537e5442be47c50b197bc571f1
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Old description:

> The following fails if IPython was never run before:
> {{{
> ./sage -t src/sage/misc/ascii_art.py
> **********************************************************************
> File "src/sage/misc/ascii_art.py", line 42, in sage.misc.ascii_art
> Failed example:
>     shell = get_test_shell()
> Exception raised:
>     Traceback (most recent call last):
>       File "/usr/local/src/sage-config/local/lib/python2.7/site-
> packages/sage/doctest/forker.py", line 480, in _run
>         self.execute(example, compiled, test.globs)
>       File "/usr/local/src/sage-config/local/lib/python2.7/site-
> packages/sage/doctest/forker.py", line 839, in execute
>         exec compiled in globs
>       File "<doctest sage.misc.ascii_art[6]>", line 1, in <module>
>         shell = get_test_shell()
>       File "/usr/local/src/sage-config/local/lib/python2.7/site-
> packages/sage/misc/interpreter.py", line 549, in get_test_shell
>         app.initialize(argv=[])
>       File "<string>", line 2, in initialize
>       File "/usr/local/src/sage-config/local/lib/python2.7/site-
> packages/IPython/config/application.py", line 89, in catch_config_error
>         return method(app, *args, **kwargs)
>       File "/usr/local/src/sage-config/local/lib/python2.7/site-
> packages/IPython/terminal/ipapp.py", line 312, in initialize
>         super(TerminalIPythonApp, self).initialize(argv)
>       File "<string>", line 2, in initialize
>       File "/usr/local/src/sage-config/local/lib/python2.7/site-
> packages/IPython/config/application.py", line 89, in catch_config_error
>         return method(app, *args, **kwargs)
>       File "/usr/local/src/sage-config/local/lib/python2.7/site-
> packages/IPython/core/application.py", line 381, in initialize
>         self.load_config_file()
>       File "/usr/local/src/sage-config/local/lib/python2.7/site-
> packages/sage/misc/interpreter.py", line 626, in load_config_file
>         get_ipython_dir(), 'sage').location
>       File "/usr/local/src/sage-config/local/lib/python2.7/site-
> packages/IPython/core/profiledir.py", line 242, in
> find_profile_dir_by_name
>         raise ProfileDirError('Profile directory not found in paths: %s'
> % dirname)
>     ProfileDirError: Profile directory not found in paths: profile_sage
> **********************************************************************
> }}}
>
> Running `./sage` once fixes this problem but it still causes the
> following to always fail:
> {{{
> ./sage --nodotsage -t src/sage/misc/ascii_art.py
> }}}

New description:

 The following fails if IPython was never run before:
 {{{
 ./sage -t src/sage/misc/ascii_art.py
 **********************************************************************
 File "src/sage/misc/ascii_art.py", line 42, in sage.misc.ascii_art
 Failed example:
     shell = get_test_shell()
 Exception raised:
     Traceback (most recent call last):
       File "/usr/local/src/sage-config/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 480, in _run
         self.execute(example, compiled, test.globs)
       File "/usr/local/src/sage-config/local/lib/python2.7/site-
 packages/sage/doctest/forker.py", line 839, in execute
         exec compiled in globs
       File "<doctest sage.misc.ascii_art[6]>", line 1, in <module>
         shell = get_test_shell()
       File "/usr/local/src/sage-config/local/lib/python2.7/site-
 packages/sage/misc/interpreter.py", line 549, in get_test_shell
         app.initialize(argv=[])
       File "<string>", line 2, in initialize
       File "/usr/local/src/sage-config/local/lib/python2.7/site-
 packages/IPython/config/application.py", line 89, in catch_config_error
         return method(app, *args, **kwargs)
       File "/usr/local/src/sage-config/local/lib/python2.7/site-
 packages/IPython/terminal/ipapp.py", line 312, in initialize
         super(TerminalIPythonApp, self).initialize(argv)
       File "<string>", line 2, in initialize
       File "/usr/local/src/sage-config/local/lib/python2.7/site-
 packages/IPython/config/application.py", line 89, in catch_config_error
         return method(app, *args, **kwargs)
       File "/usr/local/src/sage-config/local/lib/python2.7/site-
 packages/IPython/core/application.py", line 381, in initialize
         self.load_config_file()
       File "/usr/local/src/sage-config/local/lib/python2.7/site-
 packages/sage/misc/interpreter.py", line 626, in load_config_file
         get_ipython_dir(), 'sage').location
       File "/usr/local/src/sage-config/local/lib/python2.7/site-
 packages/IPython/core/profiledir.py", line 242, in
 find_profile_dir_by_name
         raise ProfileDirError('Profile directory not found in paths: %s' %
 dirname)
     ProfileDirError: Profile directory not found in paths: profile_sage
 **********************************************************************
 }}}

 Running `./sage` once fixes this problem but the following always fails:
 {{{
 ./sage --nodotsage -t src/sage/misc/ascii_art.py
 }}}

--

Comment (by jdemeyer):

 Replying to [comment:9 vbraun]:
 > So you are saying that it fails without `--nodotsage` before starting
 sage the first time? This is not what the description says.
 Fixed that.

 > Command line switches must be tested via doctests
 Testing ''everything'' with `--nodotsage` doubles the doctest time,
 testing everything as a user which doesn't have write access to
 `SAGE_ROOT` isn't even possible in doctests.

 > The release manager role is not a second reviewer for every ticket, that
 does not scale.
 In which sense does it "not scale"? I did that and it worked for me
 perfectly, there are very few tickets which would fail this test. The
 release manager already is a second reviewer, given that something like
 10% of all positively reviewed tickets simply fail when tested on the
 buildbots (maybe less now that docbuild errors are caught earlier).

--
Ticket URL: <http://trac.sagemath.org/ticket/15972#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" 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-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to