Description of problem: The `sage` command provided by sagemath fails with shell errors, when told to run a .sage script: /usr/lib64/sagemath/local/bin/sage: line 609: unexpected EOF while looking for matching `)' /usr/lib64/sagemath/local/bin/sage: line 669: syntax error: unexpected end of file Those lines in the shell script indeed look obviously wrong (some automated search-and-replace?). Removing the "#!" on line 609 in the shell script resolves that issue. However, after that sage fails with error: Traceback (most recent call last): File "foo.sage.py", line 3, in <module> from sage.all_cmdline import * # import sage library ImportError: No module named sage.all_cmdline (Maybe would be useful to have some automated testing in the rpm packaging that smoketests the ability to run .sage scripts.) Version-Release number of selected component (if applicable): sagemath-8.6-1.fc30.x86_64 How reproducible: always Steps to Reproduce: > foo.sage sage foo.sage Actual results: /usr/lib64/sagemath/local/bin/sage: line 609: unexpected EOF while looking for matching `)' /usr/lib64/sagemath/local/bin/sage: line 669: syntax error: unexpected end of file Expected results: Should run the .sage script. Additional info: -
I get a similar error for sagemath-8.7-1.fc30.x86_64 (Fedora 30): > sage /usr/lib64/sagemath/local/bin/sage: line 617: unexpected EOF while looking for matching `)' /usr/lib64/sagemath/local/bin/sage: line 677: syntax error: unexpected end of file
FEDORA-2019-7a52fd2c02 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7a52fd2c02
sagemath-8.8-1.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-7a52fd2c02
I have also another variant of experienced this issue -- when running sage --gdb sage outputs: /usr/lib64/sagemath/local/bin/sage: line 617: unexpected EOF while looking for matching `)' /usr/lib64/sagemath/local/bin/sage: line 677: syntax error: unexpected end of file The update sagemath-8.8-1.fc30 fixes this manifestation of the issue as well.
sagemath-8.8-1.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
(In reply to Fedora Update System from comment #5) > sagemath-8.8-1.fc30 has been pushed to the Fedora 30 stable repository. If > problems still persist, please make note of it in this bug report. Fedora 30, just updated: > rm -rf ~/.sage > sage python3: can't open file 'histreedit': [Errno 2] No such file or directory