# Sample match error

**URL:** <https://in-thread.sonic-pi.net/t/sample-match-error/4367>\
**Category:** Support, Help & Resources\
**Created:** [September 5, 2020, 12:11pm UTC](https://in-thread.sonic-pi.net/t/sample-match-error/4367 "2020-09-05T12:11:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [September 5, 2020, 12:11pm UTC](https://in-thread.sonic-pi.net/t/sample-match-error/4367/1 "2020-09-05T12:11:45Z")

</div>

Hi,

I meet a strange issue using the `sample` instruction with filter for one file. Sonic Pi can’t find the file from the mentioned name.

 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/6/621792fdea47f7e41f3c5f1e31e65833a7f70ecb.png)

An idea ?

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [September 5, 2020, 3:58pm UTC](https://in-thread.sonic-pi.net/t/sample-match-error/4367/2 "2020-09-05T15:58:21Z")

</div>

Does running sample\_free\_all help? Sometimes I find that cached sample paths get stale, if you add samples without resettting SP for example.

I tried

```ruby
sample_free_all
sleep 1

chemin = "~/Desktop/New"
sample chemin,"Midi"
sleep 1
sample chemin,"Next"
sleep 1

```

which worked

 ![img](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/b/b02eca8376e1f36d6dbb851043dcb23a3de8880b.png)

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [September 5, 2020, 4:47pm UTC](https://in-thread.sonic-pi.net/t/sample-match-error/4367/3 "2020-09-05T16:47:33Z")

</div>

Thanks Robin.

Can’t test right now but indeed I renamed this file without rebooting SP. It seems obvious I should !
