I am working on an application which uses Boost.Python to embed the Python interpreter. This is used to run user-generated \"scripts\" which interact with the main program.<
Adding this answer for who is still looking for a solution. ESRI released a patch for this error. Just download the patch from their website (no login required), install it and it will solve the problem. I downloaded the patch for 10.4.1 but there are maybe patches for other versions also.