Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Again trouble starting OSCAR while offline due to GAP issues #852

Closed
fingolfin opened this issue Jan 27, 2023 · 3 comments · Fixed by #1076
Closed

Again trouble starting OSCAR while offline due to GAP issues #852

fingolfin opened this issue Jan 27, 2023 · 3 comments · Fixed by #1076

Comments

@fingolfin
Copy link
Member

Reported by @ederc (who'll provide details if he still has them).

Ideal solution is to finally get GAP_pkg_*.jl out of the door....

@ederc
Copy link
Member

ederc commented Jan 27, 2023

Here is the error message:

julia> using Oscar
ERROR: InitError: Error thrown by GAP: Error, RequestError: Could not resolve host: raw.githubusercontent.com while requesting https://raw.githubusercontent.com/gap-system/gap-distribution/master/DistributionUpdate/PackageUpdate/currentPackageInfoURLList in
  Julia.Core._apply( julia_obj, args ) at /Users/ederc/repos/julia-depot/packages/GAP/p0xxt/pkg/JuliaInterface/gap/calls.gi:15 called from
PKGMAN_DownloadURL( PKGMAN_PackageInfoURLList ) at /Users/ederc/repos/julia-depot/scratchspaces/c863536a-3901-11e9-33e7-d5cd0df7b904/gap_3622292053906931894_1.10/pkg/packagemanager/gap/PackageManager.gi:19 called from
GetPackageURLs(  ) at /Users/ederc/repos/julia-depot/scratchspaces/c863536a-3901-11e9-33e7-d5cd0df7b904/gap_3622292053906931894_1.10/pkg/packagemanager/gap/PackageManager.gi:125 called from
InstallPackageFromName( string, version, interactive ) at /Users/ederc/repos/julia-depot/scratchspaces/c863536a-3901-11e9-33e7-d5cd0df7b904/gap_3622292053906931894_1.10/pkg/packagemanager/gap/PackageManager.gi:82 called from
<function "InstallPackage">( <arguments> )
 called from read-eval loop at *defin*:0

Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] ThrowObserver(depth::Int32)
   @ GAP ~/repos/julia-depot/packages/GAP/p0xxt/src/GAP.jl:88
during initialization of module GaloisGrp

@ThomasBreuer
Copy link
Member

ThomasBreuer commented Jan 27, 2023

This means that we are in the __init__ function of the GaloisGrp module in experimental/GaloisGrp when the error happens.
The problem is thus in the call GAP.Packages.load("ferret"; install=true), that is, GAP's ferret package cannot be loaded. Then an installation of ferret is tried, which fails because the package archive cannot be downloaded.

My understanding was that once the ferret package has been successfully installed, this problem should not occur anymore.

An explanation for the problem would be that the installation of ferret does not work when one is online, but one does not run into an error because the download works, and the __init__ function does not check the return value of the GAP.Packages.load call.
As soon as one is offline, one runs into the error.

@ThomasBreuer
Copy link
Member

It seems that we have to catch errors like the one reported here.
The message above gives the impression that GAP throws the error. However, the function in question is the Julia function Downloads.download, thus the problem can/must be fixed in GAP.jl.
This function itself does not admit catching the error via an optional argument, but it calls Downloads.request, which supports such a keyword argument (throw = false). Alternatively, we could just use try/catch.

I am working on a pull request for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants