I'm confused by the fact that you are saying that you see a class name for pyDisplayHarness during your error scenario as well. Going by the exception - "Error message Section 'CodeSets' execution error on page 'pyDisplayHarness' of class ''" -- the class here is '' blank when the error happens. I'm not very familiar with the PCS framework and cannot tell how the CodeSets(assuming this is OOTB) section fits into the configuration.
Can you -
- provide Tracer files for the first run(when the issue happens) and subsequent run(when the issue does not happen).
- provide Fiddler session files for the working and non-working
It would be worthwhile to compare these and see if there are any hints to troubleshoot further. Thanks.