# FileNotFoundError while using \`read\_raw\_brainvision\`, since \`.vmrk\` file name was changed

**URL:** <https://mne.discourse.group/t/filenotfounderror-while-using-read-raw-brainvision-since-vmrk-file-name-was-changed/5498>\
**Category:** Support & Discussions\
**Created:** [August 30, 2022, 11:52am UTC](https://mne.discourse.group/t/filenotfounderror-while-using-read-raw-brainvision-since-vmrk-file-name-was-changed/5498 "2022-08-30T11:52:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![datalw](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/datalw/32/133_2.png) [@datalw](https://mne.discourse.group/u/datalw)\
**Post date:** [August 30, 2022, 11:52am UTC](https://mne.discourse.group/t/filenotfounderror-while-using-read-raw-brainvision-since-vmrk-file-name-was-changed/5498/1 "2022-08-30T11:52:14Z")

</div>

- MNE version: 1.0.3
- operating system: Windows 11

```python
import mne
import os

os.chdir('data')
datapath = "sub-032301.vhdr"
raw = mne.io.read_raw_brainvision(datapath)

```

Hi, I want to read a recording using the code above and get the following error:

```python
FileNotFoundError: [Errno 2] No such file or directory: 'c:\\Users\\...\\data\\sub-010002.vmrk'

```

With `isfile(datapath)` I do get `True`.  
And in the same data folder I have the file `sub-032301.vmrk`, but somehow the function is looking for a `.vmrk` with changed name… Does anyone have the same problem?

---

<div class="post-metadata">

**Author:** ![richard](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/richard/32/15_2.png) [@richard](https://mne.discourse.group/u/richard)\
**Post date:** [August 30, 2022, 5:32pm UTC](https://mne.discourse.group/t/filenotfounderror-while-using-read-raw-brainvision-since-vmrk-file-name-was-changed/5498/2 "2022-08-30T17:32:48Z")

</div>

The files were probably renamed, which is not a good idea, because references break as in the case you’re witnessing here.

You can open the `.vhdr` file in a text editor and search for `DataFile=` and `MarkerFile=`. Their values need to be updated to match the new filenames. Change the values accordingly and save the file, and then `read_raw_brainvision()` should work again.

Best wishes,  
Richard

---

<div class="post-metadata">

**Author:** ![datalw](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/datalw/32/133_2.png) [@datalw](https://mne.discourse.group/u/datalw)\
**Post date:** [August 31, 2022, 9:25am UTC](https://mne.discourse.group/t/filenotfounderror-while-using-read-raw-brainvision-since-vmrk-file-name-was-changed/5498/3 "2022-08-31T09:25:06Z")

</div>

Thanks a lot for the swift reply! I changed the two parameters in the `.vhdr` accordingly, indeed I can read the data now 👍
