Are you running this with the whole rawtx or just the DER signature of the raw transaction? (you should run it with the whole transaction).
If that's not the case it would be much easier if you post the raw transaction you are running with here, because see can see its length (and script & signature length).
Without that info, all we can do is guess the length of the rawtx with these questions:
What's the length of your script (in characters?)
The scriptLen is defined as : scriptLen = int(txn[41*2:42*2], 16) (chars 82-83) so we know your transaction is at least 84 chars long,
and the sigLen (the part that's giving you the error), is defined as:
script = txn[42*2:42*2+2*scriptLen]
sigLen = int(script[0:2], 16)
which means in chars (84-87) the signature length is encoded.
This is all the info we can gleam without the rawtx. You could provide that, or look at chars 84-87 of the rawtx and give us the string of characters placed there (to which we'd probably tell you that your rawtx length is shorter than the 2*sigLen*2+2 number where the public key length is located in i.e. your rawtx is too short).