'str'object has not attribute 'subs' : Here is my python code written in vim editor;whenever i run it via command prompt i get the error 'str'object has not attribute 'subs'

from sympy import *
x,a_test,b_test,fa_test,fb_test=symbols('x a_test b_test fa_test fb_test')
expr=raw_input("enter the equation")
print expr
print "hello"
try:
    print "hello"
    inc=0
    a=inc
    fa=expr.subs(x,inc)
    print "hello"
    if(fa<0):
        print "hello"
        inc+=1
        fb=expr.subs(x,inc)
        if(fb<=0):
            while(fb<=0):
                inc+=1
    else:
        print "hello"
        inc+=1
        fb=expr.subs(x,inc)
        if(fb<=0):
            while(fb<=0):
                inc+=1
    b=inc
    print a
    print b
    print fa
    print fb
except Exception,e:
    print e
