-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
SloaneEncyclopedia.find and some other SloaneEncyclopedia.* are broken #34655
Comments
comment:1
--- a/sage/databases/sloane.py
+++ b/sage/databases/sloane.py
@@ -274,7 +274,7 @@
for L in file_seq:
if len(L) == 0:
continue
- m = entry.search(L)
+ m = entry.search(L.decode("utf-8"))
if m:
seqnum = int(m.group('num'))
msg = m.group('body').strip()
@@ -287,10 +287,13 @@
for L in file_names:
if not L:
continue
- m = entry.search(L)
+ m = entry.search(L.decode("utf-8"))
if m:
seqnum = int(m.group('num'))
- self.__data__[seqnum][3] = m.group('body').strip()
+ if seqnum in self.__data__:
+ self.__data__[seqnum][3] = m.group('body').strip()
+ else:
+ self.__data__[seqnum] = [seqnum, None, 'unknown', m.group('body').strip()]
file_names.close()
self.__loaded_names__ = True
except KeyError: |
vbraun
pushed a commit
to vbraun/sage
that referenced
this issue
Nov 26, 2024
<!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> motivated by sagemath#38764 (comment) fixes sagemath#38764 (comment) example: ```sage sage: SloaneEncyclopedia[60843] # optional - sloane_database [1, 6, 21, 107, 47176870] sage: SloaneEncyclopedia[60843] # optional - !sloane_database Traceback (most recent call last): ... OSError: The Sloane Encyclopedia database must be installed. Use e.g. 'SloaneEncyclopedia.install()' to download and install it. ``` along the way, we - define `sloane_database` feature (I wonder why it was missing) - fix `SloaneEncyclopedia` with the code by @sheerluck: https://github.c om/sheerluck)sagemath#34655 (comment) 1418189098 - fix the problem of `solve()` for rubiks cube of silently choosing the gap algorithm even when an algorithm is explicitly specified. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#38810 Reported by: Kwankyu Lee Reviewer(s):
vbraun
pushed a commit
to vbraun/sage
that referenced
this issue
Nov 28, 2024
<!-- ^ Please provide a concise and informative title. --> <!-- ^ Don't put issue numbers in the title, do this in the PR description below. --> <!-- ^ For example, instead of "Fixes sagemath#12345" use "Introduce new method to calculate 1 + 2". --> <!-- v Describe your changes below in detail. --> <!-- v Why is this change required? What problem does it solve? --> <!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes sagemath#12345". --> motivated by sagemath#38764 (comment) fixes sagemath#38764 (comment) example: ```sage sage: SloaneEncyclopedia[60843] # optional - sloane_database [1, 6, 21, 107, 47176870] sage: SloaneEncyclopedia[60843] # optional - !sloane_database Traceback (most recent call last): ... OSError: The Sloane Encyclopedia database must be installed. Use e.g. 'SloaneEncyclopedia.install()' to download and install it. ``` along the way, we - define `sloane_database` feature (I wonder why it was missing) - fix `SloaneEncyclopedia` with the code by @sheerluck: https://github.c om/sheerluck)sagemath#34655 (comment) 1418189098 - fix the problem of `solve()` for rubiks cube of silently choosing the gap algorithm even when an algorithm is explicitly specified. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [x] The title is concise and informative. - [x] The description explains in detail what this PR is about. - [x] I have linked a relevant issue or discussion. - [x] I have created tests covering the changes. - [x] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#38810 Reported by: Kwankyu Lee Reviewer(s):
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As described in https://groups.google.com/d/msgid/sage-support/67ce17aa-056b-49c1-95ad-e5cb75e25ba9n%40googlegroups.com
CC: @PeterLuschny
Component: packages: optional
Issue created by migration from https://trac.sagemath.org/ticket/34655
The text was updated successfully, but these errors were encountered: