<p>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: <a href="https://www.wikihow.com/Create-and-Delete-Files-and-Directories-from-Windows-Command-Prompt" rel="nofollow noreferrer">https://www.wikihow.com/Create-and-Delete-Files-and-Directories-from-Windows-Command-Prompt</a>. I created the file using the following steps:</p>

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

<p>Hope that works :)</p>

CC BY-SA 4.0
2019-05-22T22:16:43.660Z
There's an option to get Windows Explorer to show file extensions. I strongly recommend turning it on, so that you can tell the difference in this kind of scenario!
Semidiurnal Simon
CC BY-SA 4.0
2019-05-24T07:21:56.110Z
Actually, I manage to found a simpler solution. So, I created a text file and I pasted the key and UID info. Then I saved it as .cdsapirc and selected All files (*.*) as file type. After that, I was able to download the data normally. Thank you for your help anyway, it led me into the right direction somehow.
Gina Torres
CC BY-SA 4.0
2019-05-24T10:49:11.677Z
Ah yes, that is easier! I will post your answer on the ECMWF website, here https://confluence.ecmwf.int/pages/viewpage.action?pageId=139068264
Laurie Wilkinson
CC BY-SA 4.0
2020-01-28T11:35:34.923Z
Even after doing so (creating .cdsapirc file with proper info of UID and API key), I am getting same error. i have downloaded ERA-Interim data from same earlier).
Shivam Singh
CC BY-SA 4.0
2019-05-21T15:32:37.477Z
2019-05-21T15:32:37.477Z
Laurie Wilkinson
<p>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 <a href="https://cds.climate.copernicus.eu/api-how-to" rel="nofollow noreferrer">https://cds.climate.copernicus.eu/api-how-to</a> </p>

<p>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:</p>

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

<p>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):</p>

<pre><code>C:\Users\username\.cdsapirc
</code></pre>

<p>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?</p>

<pre><code>Exception: Missing/incomplete configuration file: C:\Users\username/.cdsapirc
</code></pre>

<p>By the way, I'm using a windows computer.</p>

CC BY-SA 4.0
2019-05-22T22:15:56.047Z
@gansub eh, plenty of us use Windows.
Semidiurnal Simon
CC BY-SA 4.0
2019-05-23T05:38:09.533Z
@gansub I think you'll find it very field-dependant. Many of us use both, of course, but don't underestimate the need to have MS Word and Outlook ;-)
Semidiurnal Simon
CC BY-SA 4.0
2022-02-02T08:23:52.533Z
Point 3 from the answer is not clear. What should I right click?
Mulugeta T. Taye
<reanalysis><era><python>
Error trying to download ERA5 data: Exception: Missing/incomplete configuration file: C:\Users\username/.cdsapirc
Gina Torres
# Error trying to download ERA5 data: Exception: Missing/incomplete configuration file: C:\Users\username/.cdsapirc

(Asked by: username_0 on 2019-05-17)

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.

**Tags:** reanalysis, era, python

> **Comments:**
> **username_1**: @gansub eh, plenty of us use Windows.  
> **username_1**: @gansub I think you'll find it very field-dependant. Many of us use both, of course, but don't underestimate the need to have MS Word and Outlook ;-)  
> **username_2**: Point 3 from the answer is not clear. What should I right click?  

---

## 1 answers

### Answer by username_3 on 2019-05-21. Score: 4 | Accepted answer

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:

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

Hope that works :)

> **Comments:**
> **username_1**: There's an option to get Windows Explorer to show file extensions. I strongly recommend turning it on, so that you can tell the difference in this kind of scenario!  
> **username_0**: Actually, I manage to found a simpler solution. So, I created a text file and I pasted the key and UID info. Then I saved it as .cdsapirc and selected All files (*.*) as file type. After that, I was able to download the data normally. Thank you for your help anyway, it led me into the right direction somehow.  
> **username_3**: Ah yes, that is easier! I will post your answer on the ECMWF website, here https://confluence.ecmwf.int/pages/viewpage.action?pageId=139068264  
> **username_4**: Even after doing so (creating .cdsapirc file with proper info of UID and API key), I am getting same error. i have downloaded ERA-Interim data from same earlier).  

---

