# Revision history [back]

### Unable to convert string to rational when plus sign is added

This looks like a bug. The code

QQ('+1')


gives the exception

TypeError: unable to convert '+1' to a rational

This happens with any positive rational, not just 1.

Also, this does not happen with either

ZZ('+1')


Is this actually a bug? If it is, can someone investigate it and write a trac ticket? I'm quite new to Sagemath and Python and quite unskilled yet to do it properly. Thank you!

nor

PolynomialRing(QQ,names='x')('+1')


### Unable to convert string to rational when plus sign is added

This looks like a bug. The code

QQ('+1')


gives the exception

TypeError: unable to convert '+1' to a rational

This happens with any positive rational, not just 1.

Also, this does not happen with either

ZZ('+1')


nor

PolynomialRing(QQ,names='x')('+1')


Is this actually a bug? If it is, can someone investigate it and write a trac ticket? I'm quite new to Sagemath and Python and quite unskilled yet to do it properly. Thank you!

nor

PolynomialRing(QQ,names='x')('+1')


### Unable to convert string to rational when plus sign is added

This looks like a bug. The code

QQ('+1')


gives the exception

TypeError: unable to convert '+1' to a rational

This happens with any positive rational, not just 1.

Also, this does not happen with eitherneither

ZZ('+1')


nor

PolynomialRing(QQ,names='x')('+1')


Is this actually a bug? If it is, can someone investigate it and write a trac ticket? I'm quite new to Sagemath and Python and quite unskilled yet to do it properly. Thank you!