When you run tracer, can you see which ruleset the error is coming from? Quick review reveals that there is one pyState in the baseclass (PegaRules ruleset) and another in Data-Party (Pega ProCom). Find out which ruleset is throwing the error.
Even though we had done save as of pyState in our application RS and removed the Max and Expected length we were still getting error, because the pyState was used in activities.
When activities were created pyState had restriction, java code got generated with latest property settings @ that time (restriction to 2 characters) . Even though we had updated the property pyState, referencing activities still had old java code, so we had to save as the activities into new open RS version for java code to regenerate and take latest property settings .