You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- a/src/sage/libs/gap/libgap.pyx+++ b/src/sage/libs/gap/libgap.pyx@@ -253,7 +253,10 @@ cdef class SageGap(Gap):
"""
def __init__(self):
- workspace, _ = get_workspace()+ workspace, isitthere = get_workspace()+ if not isitthere:+ workspace = None
Gap.__init__(self, gap_root=gap_root(), workspace=workspace,
autoload=True)
@@ -283,6 +287,10 @@ cdef class SageGap(Gap):
from . import converters
workspace, workspace_is_up_to_date = get_workspace()
+ if self.workspace is None:+ # Create new workspace+ self.workspace = os.path.normpath(workspace)
if self.workspace == os.path.normpath(workspace):
# Save a new workspace if necessary
if not workspace_is_up_to_date:
it might be necessary to pass Gap.__init__() the value workspace=None, as only then no attempt is made to load
the non-existent workspace, something that leads to a crash in gappy (see here). (This explains the first chunk of the diff).
However, then I cannot overwrite self.workspace later, when I'd like to save a new workspace, so the second chunk leads to the error
AttributeError: attribute 'workspace' of 'gappy.core.Gap' objects is not writable
An obvious way to handle this would be to change gappy code to have one more constructor parameter to tell it whether workspace is legit, rather than try to use workspace=None to test this.
Can you think of anything better (avoiding modifying gappy) ?
The text was updated successfully, but these errors were encountered:
dimpase
added a commit
to dimpase/gappy
that referenced
this issue
Sep 6, 2021
in https://trac.sagemath.org/ticket/31404 the GAP workspace management is broken (I guess it never worked).
Here is how I am trying to fix it:
it might be necessary to pass
Gap.__init__()
the valueworkspace=None
, as only then no attempt is made to loadthe non-existent workspace, something that leads to a crash in
gappy
(see here). (This explains the first chunk of the diff).However, then I cannot overwrite
self.workspace
later, when I'd like to save a new workspace, so the second chunk leads to the errorAn obvious way to handle this would be to change
gappy
code to have one more constructor parameter to tell it whetherworkspace
is legit, rather than try to useworkspace=None
to test this.Can you think of anything better (avoiding modifying
gappy
) ?The text was updated successfully, but these errors were encountered: