That all looks ok.
Are you calling the putenv before the coda import as is also mentioned here?
putenv