t is a string with the value of '2000'. You are looking to make t a string with only the number 2000 by doing t = "2000". With int() you are trying to convert the apostrophes to ints as well which you can't.
You have a double quoted string, in the error message it warns you about thr ' beeing a illegal number for conversion. Either clean your string to t="10" removing the redundant quotes or strip the string if received from else where int(t[1:-1]).