Hello Pierre,
Each project always has an active chunk (if there is at least one chunk), which is opened by default, when you load the project.
If you need to change the active chunk, call:
doc.chunk = doc.chunks[N] #N - chunk's index in the Workspace pane, starting from 0