test_xrl AttributeError TypeError RuntimeError xreadlines object accessed out of order