Problem
ecmwfapi.api.APIException: u'ecmwf.API error 1: Invalid or missing key or token'
Solution
There are 3 possible issues for this error:
- The file .ecmwfapirc does not exist or has an invalid format
- You should go to https://api.ecmwf.int/v1/key/ and copy exactly the content of the text box into the file $HOME/.ecmwfapirc
- Your token has expired:
- Logging in to https://api.ecmwf.int/v1/key/ will trigger the creation of a new one. Just replace the old one with the new one.
- Your token has been manually disabled by our operators
- You should have received an email explaining the reason for that. If that is not the case, contact us.