Search code examples
pythonterminalpycharmwandb

Unable to pass wandb API Key in PyCharm terminal


wandb: (1) Create a W&B account
wandb: (2) Use an existing W&B account
wandb: (3) Don't visualize my results
wandb: Enter your choice: 2
wandb: You chose 'Use an existing W&B account'
wandb: Logging into wandb.ai. (Learn how to deploy a W&B server locally: https://wandb.me/wandb-server)
wandb: You can find your API key in your browser here: https://wandb.ai/authorize
wandb: Paste an API key from your profile and hit enter, or press ctrl+c to quit:

Here my terminal in PyCharm freezes an I have no means whatsoever to enter or paste my API Key. On pressing enter nothing happens either. Any help or ideas?


Solution

  • Found an issue report on their GitHub here.

    There is also a workaround proposed. Before even prompted to enter your API key you can do so in advance from your terminal like so..

    wandb login xxxxxxxxxYOUR_KEY_HERExxxxxxxxxxxxxx
    

    Or more generalized from @shaik moeed's comment refering to their documentation:

    wandb login [OPTIONS] [KEY]
    

    You will then not be asked to enter your Key later on and you won't get stuck.

    Note: This is a workaround, not sure why my terminal did not like me to paste stuff, would still be nice to know whether you guys can reproduce or whether it's me.