Opening canvas in a pyroot program

So when I reduce the code (which I attach along with output2.txt and the same .root file) to just reading in data I have already written, I get no error message and the canvases both display…
output2.txt (12 Bytes)
test.py (714 Bytes)
dif_etaphi4.root (15.8 KB)

The second canvas also displays if I write a data point to output2.txt…
test2.py (839 Bytes)

Yet when I run test3.py the problem is replicated:

Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
[GCC 5.3.1 20160413] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.

execfile(“test2.py”)
Error in TTree::ReadStream: Error reading stream: no newline found.

The second canvas does not display. However, when I repeat the command immediately afterwards both canvases display.
test3.py (872 Bytes)