Bug 1706234 - sage fails with shell error when running .sage scripts
Summary: sage fails with shell error when running .sage scripts
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: sagemath
Version: 30
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Paulo Andrade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-03 20:56 UTC by pav
Modified: 2019-07-11 08:47 UTC (History)
4 users (show)

Fixed In Version: sagemath-8.8-1.fc30
Clone Of:
Environment:
Last Closed: 2019-07-11 00:57:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description pav 2019-05-03 20:56:02 UTC
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:
-

Comment 1 Mihai Lazarescu 2019-05-21 18:33:53 UTC
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

Comment 2 Fedora Update System 2019-07-02 14:18:48 UTC
FEDORA-2019-7a52fd2c02 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-7a52fd2c02

Comment 3 Fedora Update System 2019-07-03 02:26:54 UTC
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

Comment 4 Thomas Wright 2019-07-10 10:12:01 UTC
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.

Comment 5 Fedora Update System 2019-07-11 00:57:53 UTC
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.

Comment 6 Mihai Lazarescu 2019-07-11 08:47:56 UTC
(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


Note You need to log in before you can comment on or make changes to this bug.