#14171: gap_reset_workspace can fail if directory is missing
------------------------------------------------+--------------------------
Reporter: vbraun | Owner: tbd
Type: defect | Status:
Priority: major | needs_review
Component: interfaces | Milestone: sage-5.11
Keywords: | Resolution:
Authors: Jeroen Demeyer, Volker Braun | Merged in:
Report Upstream: N/A | Reviewers: Volker
Branch: | Braun
Stopgaps: | Work issues:
| Dependencies:
------------------------------------------------+--------------------------
Changes (by {'newvalue': u'Jeroen Demeyer, Volker Braun', 'oldvalue': u'Jeroen
Demeyer'}):
* reviewer: => Volker Braun
* author: Jeroen Demeyer => Jeroen Demeyer, Volker Braun
Old description:
> As reported on sage-devel (https://groups.google.com/d/topic/sage-devel
> /K1ytSY-3Uro/discussion)
>
> I tried "./sage -i database_gap" but it died with an error:
> {{{
> Installed tomlib database.
> Traceback (most recent call last):
> File "/.../sage-5.7/local/bin/sage-eval", line 14, in <module>
> eval(compile(s,'<cmdline>','exec'))
> File "<cmdline>", line 1, in <module>
> File "/.../sage-5.7/local/lib/python2.7/site-
> packages/sage/interfaces/gap.py", line 1465, in gap_reset_workspace
> for F in os.listdir(GAP_DIR):
> OSError: [Errno 2] No such file or directory: '/home/NewUser/.sage/gap'
> (...)
> }}}
New description:
As reported on sage-devel (https://groups.google.com/d/topic/sage-devel
/K1ytSY-3Uro/discussion)
I tried "./sage -i database_gap" but it died with an error:
{{{
Installed tomlib database.
Traceback (most recent call last):
File "/.../sage-5.7/local/bin/sage-eval", line 14, in <module>
eval(compile(s,'<cmdline>','exec'))
File "<cmdline>", line 1, in <module>
File "/.../sage-5.7/local/lib/python2.7/site-
packages/sage/interfaces/gap.py", line 1465, in gap_reset_workspace
for F in os.listdir(GAP_DIR):
OSError: [Errno 2] No such file or directory: '/home/NewUser/.sage/gap'
(...)
}}}
Apply
* [attachment:14171_missing_gap_dir.patch]
* [attachment:14171_fix_long_time.patch]
--
Comment:
The short (not `--long`) doctest fails because `gap_reset_workspace()` is
not called yet the existence of a newly-created workspace is checked.
Fixed in reviewer patch.
--
Ticket URL: <http://trac.sagemath.org/ticket/14171#comment:3>
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/groups/opt_out.