Try adding gROOT->cd();
(its PyROOT equivalent, rather), or creating a new TFile, between getting the original tree and doing CopyTree. See this (even the title of this post is the same as yours, so you would have found it searching the Forum):
Try adding gROOT->cd();
(its PyROOT equivalent, rather), or creating a new TFile, between getting the original tree and doing CopyTree. See this (even the title of this post is the same as yours, so you would have found it searching the Forum):