e-reader error when popping out window

Moving work on BLD-465 from PR 1811.
Fixing missing import in Python.
Addressing DB's comment.

BLD-465.