Fix pycodeerror issue