Error trying to download ERA5 data: Exception: Missing/incomplete configuration file: C:\Users\username/.cdsapirc I am new with Python so please be kind. 
I want to download data from ERA5 and so far I have installed the CDS API package and followed all the instructions from https://cds.climate.copernicus.eu/api-how-to 

I have my main file ready to use but I get an error about the configuration file. I know that this file should contain the following:

url: https://cds.climate.copernicus.eu/api/v2
key: {UID}:{key}
verify:0


I have created a text file and a configuration file with this info and I have placed them in the following address (as required by the error I get in python):

C:\Users\username\.cdsapirc


However, I still get the same error. What I am doing wrong? Do I need to create a different type of file? Do I need to write the user info in a different way?

Exception: Missing/incomplete configuration file: C:\Users\username/.cdsapirc


By the way, I'm using a windows computer.
I had the same problem but have just found the solution after an hour or so of trawling through forums! The problem was that the code 'api.py' could not find the '.cdsapirc' file. The file type has to actually be 'CDSAPIRC' and not a 'txt' file. The icon for the file will then be displayed in your folder as blank and the name will be '.cdsapirc'. I found the solution on here: https://www.wikihow.com/Create-and-Delete-Files-and-Directories-from-Windows-Command-Prompt. I created the file using the following steps:


Navigate to 'C:\Users\username' (or you can just move it later). 
In Command Prompt, write 'type nul > .cdsapirc' and press Enter. 
Right-click the file and press 'Edit with Notepad++' (probably works with other programs).   
Paste the text that you already mentioned (key, etc). 
Save and close the document.  


Hope that works :)