I am just learning the Python API so bear with me. A strange text box appears before the password prompt (appears twice). Not sure what is causing it.
I enter the password four times
Can you attach a copy of the Jupyter so I can test the issue on my end?
Have you tried restarting the Python kernel?
The text boxes are a result of calling getpass() twice. The getpass() function prompts for user input without revealing it in plaintext. If you don't mind me asking, what is the goal of this script? Do you wish to authenticate to both the target and source portal anonymously? If so, there is no need to use the getpass() function.