What worked for me was the statement:
page.window.icon = "full path\icon x.ico"
Two important things to consider:
1. In the path, remember that for it to be read, \ must be added \\ to each one.
2. The image format must actually be .ico. It's not useful to download a .png and just change the extension.