Ask Your Question

EOL error in Sage-9.1

asked 2020-10-01 03:08:30 -0600

saxad gravatar image

updated 2020-10-01 14:54:29 -0600

slelievre gravatar image

I want to modify a Python package for solving 'Quasi normal modes' using SageMath if possible, I want the below error to be fixed.


grav_220 = qnm.modes_cache(s=-2, l=2, m=2, n=0)
omega, A, C = grav_220(a=0.68)
print('ω={}, A={}'.format(omega, A))

I get the error for the second input as

File "<ipython-input-13-1f77b2f8a4ef>", line 4
SyntaxError: EOL while scanning string literal
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2020-10-01 10:46:48 -0600

slelievre gravatar image

The error message suggests a string is opened but never closed.

Indeed, looking at the code, one of the strings' closing delimiter is doubled.

This must be a typo: the opening string delimiter is a single quote ' but the closing string delimiter is two single quotes ''.

That does not work.

Solution: replace



edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2020-10-01 03:08:30 -0600

Seen: 43 times

Last updated: Oct 01