Hello thuang,
If you wish to access active chunk in the document, you need to do the following assignment:
chunk = PhotoScan.app.document.chunk
In other cases, use proper index in the list of chunks:
chunk = PhotoScan.app.document.chunks[i]
where i is an integer number of the chunk (first chunk has zero index).
Using chunk = PhotoScan.Chunk() creates an empty instance of .Chunk() class that is not connected anyhow to the active project file.