Sonic Pi does not boot [fixed]


I’m installing and launching Sonic Pi for the first time on this PC (latest Windows 10) and what I’m getting is:

Sonic Pi Boot Error Report


System Information

  • Sonic Pi version: 3.2.2
  • OS: Windows 10 Version 1909



[GUI] - Welcome to the Sonic Pi GUI
[GUI] - ===========================
[GUI] -                            
[GUI] - {11923d5c-aefd-472c-850f-e4105f564ecc}
[GUI] - Discovering port numbers...
[GUI] - Detecting port numbers...
[GUI] - GUI listen to server port 0
[GUI] -    port: 0 [Not Available]
[GUI] - Server listen to gui port 0
[GUI] -    port: 0 [Not Available]
[GUI] - Server incoming OSC cues port 0
[GUI] -    port: 0 [Not Available]
[GUI] - Scsynth port 0
[GUI] -    port: 0 [Not Available]
[GUI] - Server send to GUI port 0
[GUI] -    port: 0 [Not Available]
[GUI] - GUI send to server port 0
[GUI] -    port: 0 [Not Available]
[GUI] - Scsynth send port 0
[GUI] -    port: 0 [Not Available]
[GUI] - Erlang router port 0
[GUI] -    port: 0 [Not Available]
[GUI] - OSC MIDI out port 0
[GUI] -    port: 0 [Not Available]
[GUI] - OSC MIDI in port 0
[GUI] -    port: 0 [Not Available]
[GUI] - Websocket port 0
[GUI] -    port: 0 [Not Available]
[GUI] - Critical Error. One or more ports is not available.

Server Errors


Server Output


Scsynth Output


Process Log


Hi there,

do you happen to have your locale set to something that has a different character set to US/GB English?

If so, there’s a very good chance that we’ve already fixed this issue and the next release will work out of the box for you.

Until then, you can try following the steps here to modify your local install to see if that fixes things for you:

  1. Open C:\Program Files\Sonic Pi\app\server\native\ruby\lib\ruby\2.7.0\win32\registry.rb
  2. Replace Encoding.find(Encoding.locale_charmap) with Encoding::UTF_8 . It should be on the 72nd line.

That section should look as follows:

 WCHAR = Encoding::UTF_16LE
 WCHAR_NUL = "\0".encode(WCHAR).freeze
 WCHAR_CR = "\r".encode(WCHAR).freeze
 LOCALE = Encoding::UTF_8

Then see if Sonic Pi boots.

Well, I have the following settings:

  • “Country or region” parameter is indeed set to a different country
  • “Regional format” is set to “English (Unites States)”
  • “Windows display language” is set to “English (Unites States)”
  • Default app language and default input language is set to “English (Unites States)”

but the suggested fix worked :slight_smile: Thanks!

1 Like

Yes, it’s likely that your Country or Region settings have selected a character code page that Ruby doesn’t seem to support. Forcing the encoding to UTF-8 seems to fix things - really happy that it worked for you.

The next release should ‘just work’ without requiring any modifications.

Hope you have a lot of fun playing with Sonic Pi and welcome to our community! We really look forward to seeing what you do!

1 Like

Thanks! Though I’m far from a professional musician, I remember having great fun times with Overtone. So I expect no less from Sonic Pi :smiley:

1 Like

Awesome! If you have any synths you designed in Overtone - you can use them directly in Sonic Pi with probably only a tiny bit of modification (they need to output a stereo signal to an out_bus arg and self-terminate (usually with a FREE on completion of an envelope).

Here’s Sonic Pi’s default synth designs to check out:

1 Like