# Runtime error, live coding tutorial

**URL:** <https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858>\
**Category:** Support, Help & Resources\
**Tags:** releases\
**Created:** [September 25, 2025, 2:23am UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858 "2025-09-25T02:23:25Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![superbot](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/superbot/32/3022_2.png) [@superbot](https://in-thread.sonic-pi.net/u/superbot)\
**Post date:** [September 25, 2025, 2:23am UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/1 "2025-09-25T02:23:25Z")

</div>

Hello,

I’ve downloaded Sonic Pi on Windows for the first time, on the bottom of the sonic pi window there’s a tutorial, that prompts me to paste the code into a free buffer, but when I copy this code:

live\_loop :flibble do  
sample :bd\_haus, rate: 1  
sleep 0.5  
end

I get this error

```ruby
Runtime Error: [workspace_zero] - Thread death!

```

```ruby
 undefined method 'live_loop ' for an instance of SonicPiLang (NoMethodError)

```

```ruby
Did you mean? live_loop

```

```ruby
workspace_zero:3:in 'block (2 levels) in SonicPi::RuntimeMethods#__spider_eval'

```

```ruby
C:/Program Files/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:955:in 'Kernel#eval'

```

```ruby
C:/Program Files/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:955:in 'block (2 levels) in SonicPi::RuntimeMethods#__spider_eval'

```

```ruby
C:/Program Files/Sonic Pi/app/server/ruby/lib/sonicpi/runtime.rb:1200:in 'block (2 levels) in SonicPi::RuntimeMethods#__in_thread'

```

Any idea what’s the issue ? Thank you

---

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [September 25, 2025, 2:55am UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/2 "2025-09-25T02:55:33Z")

</div>

Hi @superbot. That code above should absolutely work - no idea what’s happening that it’s not. What version of Sonic Pi are you using?  
Any chance of a video of you trying to run this code?

---

<div class="post-metadata">

**Author:** ![brendanmac](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/brendanmac/32/2809_2.png) [@brendanmac](https://in-thread.sonic-pi.net/u/brendanmac)\
**Post date:** [September 25, 2025, 7:00am UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/3 "2025-09-25T07:00:13Z")

</div>

Hi

I copied that code from the tutorial and it runs without issue - vers 4.6 Windows 10; what version/OS are you running?

PD-Pi

---

<div class="post-metadata">

**Author:** ![superbot](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/superbot/32/3022_2.png) [@superbot](https://in-thread.sonic-pi.net/u/superbot)\
**Post date:** [September 25, 2025, 12:30pm UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/4 "2025-09-25T12:30:32Z")

</div>

Hello and thanks for the answer !

I’m using version 4.6 on windows 11.

I changed the language from french to english and it worked, then I switched back to french and it seems to still be working

I’m very confused! But I guess the issue solved itself 🙏

Thank you both for the answers I’ll come back here if the issue happens again

---

<div class="post-metadata">

**Author:** ![superbot](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/superbot/32/3022_2.png) [@superbot](https://in-thread.sonic-pi.net/u/superbot)\
**Post date:** [September 25, 2025, 5:24pm UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/5 "2025-09-25T17:24:28Z")

</div>

Well I’m having the same issue, it was working so I kept following the tutorial, it asked to add another sample, but I got a similar error “undefined sample, do you mean sample”

I’m not sure what information to add, I’m using a bluetooth headset that’s not always connected. But I tried restarting Sonic Pi several times

Now it doesn’t recognize the live\_loop again 🤔

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

---

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [September 26, 2025, 12:15am UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/6 "2025-09-26T00:15:50Z")

</div>

@superbot - can you try switching to English language again briefly and try rewriting the bits that didn’t work this second time? A bit of a stab in the dark but I’m wondering whether it’s definitely something to do with that.

---

<div class="post-metadata">

**Author:** ![superbot](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/superbot/32/3022_2.png) [@superbot](https://in-thread.sonic-pi.net/u/superbot)\
**Post date:** [September 26, 2025, 1:40am UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/7 "2025-09-26T01:40:45Z")

</div>

It doesn’t seem to make any difference, what usually works as a fix is restarting the software, it’s kinda random 😕

---

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [September 26, 2025, 1:43am UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/8 "2025-09-26T01:43:27Z")

</div>

Sure. It might not pick up the language change until after the app is restarted anyway…

---

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [September 26, 2025, 2:08am UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/9 "2025-09-26T02:08:11Z")

</div>

I’ve just done a test by switching my system settings to French in Windows, and telling Sonic Pi to use System Language to match. Can confirm the above issue, and I have my suspicions, though I’m not 100% sure of the exact cause yet. @superbot - can I ask a big favour? are you able to raise this as an official issue on the GitHub page? 🙏

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [September 26, 2025, 11:50am UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/10 "2025-09-26T11:50:53Z")

</div>

Thanks for looking into this Ethan.

One thing that struck me as odd is that it says `undefined method ‘live_loop `’ - notice the space at the end of the word. Perhaps there’s an invisible character there that’s being added to the function name and making it not `live_loop`.

---

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [September 26, 2025, 12:02pm UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/11 "2025-09-26T12:02:34Z")

</div>

@samaaron I know what the problem is and yes you are correct. Sometime tomorrow I’ll raise an issue if superbot hasn’t already and describe the details. In essence though, it will require handling translations of code examples carefully when copying and pasting in languages other than English.

---

<div class="post-metadata">

**Author:** ![superbot](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/superbot/32/3022_2.png) [@superbot](https://in-thread.sonic-pi.net/u/superbot)\
**Post date:** [September 26, 2025, 12:19pm UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/12 "2025-09-26T12:19:53Z")

</div>

Do you still need me to raise this as an issue on github ? Nice catch anyway! 👏

---

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [September 26, 2025, 12:20pm UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/13 "2025-09-26T12:20:38Z")

</div>

I can do it, no problem. Thanks for pointing it out to begin with!

---

<div class="post-metadata">

**Author:** ![ethancrawford](https://avatars.discourse-cdn.com/v4/letter/e/a88e4f/32.png) [@ethancrawford](https://in-thread.sonic-pi.net/u/ethancrawford)\
**Post date:** [September 26, 2025, 12:46pm UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/14 "2025-09-26T12:46:52Z")

</div>

> <https://github.com/sonic-pi-net/sonic-pi/issues/3490>
>
> As originally pointed out on in\_thread at https://in-thread.sonic-pi.net/t/runti…me-error-live-coding-tutorial/9858, there are certain situations where copying and pasting code examples from the tutorial into the editor to run, may instead produce an error, such as \`undefined method 'live\_loop '\`, (or similar for other Sonic Pi commands).
> 
> This happens due to the community translations being created with non-standard characters being used in place of the usual ones when describing the Ruby code. For example, the issue in the above forum post occurs when the example defined in the French translation is used. \_Visually\_, it looks virtually identical to the English version, but when inspecting the unicode characters themselves, the code numbers are different.
> English version:
> \`\`\`
> live\_loop :flibble
> \`\`\`
> The space character here is \`U+0020\` (ASCII space).
> 
> French version:
> \`\`\`
> live\_loop :flibble
> \`\`\`
> The 'space' character here is actually \`U+202F\` (Narrow No-Break Space - NNBSP)
> 
> ...Incidentally, how truthful it is I can't say, but Claude states that U+202F is commonly used in French text formatting, particularly:
> \- Before colons, semicolons, exclamation marks, and question marks
> \- In number formatting (e.g., "1 000" instead of "1,000")
> 
> ... but back to the issue - This will mean that translations will need to be handled a little bit more carefully somewhere.
> I'm not sure of the right place - but there will at least need to be some kind of thing happening that means that the code examples can be copied and pasted straight away without causing an error like described above.

---

<div class="post-metadata">

**Author:** ![superbot](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/superbot/32/3022_2.png) [@superbot](https://in-thread.sonic-pi.net/u/superbot)\
**Post date:** [September 26, 2025, 1:49pm UTC](https://in-thread.sonic-pi.net/t/runtime-error-live-coding-tutorial/9858/15 "2025-09-26T13:49:37Z")

</div>

Great, I’m glad, I’m gonna try to learn the software now 😛
