supriya-project/supriya

Booting server fails

enchilada404 opened this issue · 11 comments

Installed with no issues, and import works fine. When I try to boot the server, I get this:

>>> server = supriya.Server().boot()
Traceback (most recent call last):
  File "E:\prg\Python39\lib\site-packages\supriya\realtime\protocols.py", line 61, in boot
    raise supriya.exceptions.ServerCannotBoot(line)
supriya.exceptions.ServerCannotBoot

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\prg\Python39\lib\site-packages\supriya\realtime\servers.py", line 1033, in boot
    self._process_protocol.boot(self._options, scsynth_path, port)
  File "E:\prg\Python39\lib\site-packages\supriya\realtime\protocols.py", line 65, in boot
    process_group = os.getpgid(self.process.pid)
AttributeError: module 'os' has no attribute 'getpgid'
  • OS: Windows 10 64 bit
  • Python Version: 3.9.7
  • SuperCollider Version: 3.12.12
  • Supriya Version: 22.8b2

I haven't laid eyes on a Windows machine in years, so this is going to be a lot of guessing I'm afraid.

The line with os.getpgid(...) - which is probably *nix/OSX-only - fires when the Server already fails to boot for some reason.

Before booting the server, can you run supriya._setup_logging("supriya.server")? That should print out additional information.

My other concern is that even if I stumble my way to a fix for you, I don't know how to test using SuperCollider on Windows in GitHub Actions, so I can't guarantee anything will stick 🤔

Ok,

Here's the output with logging:

C:\Windows\System32>py
Python 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import supriya
>>> supriya._setup_logging("supriya.server")
>>> server = supriya.Server().boot()
2022-08-10 14:11:52,875 - supriya.server.protocol - INFO - Boot: E:\prg\SuperCollider-3.12.2 -R 0 -l 1 -u 57110
2022-08-10 14:11:54,734 - supriya.server.protocol - INFO - Boot: 'E:\prg\SuperCollider-3.12.2' is not recognized as an internal or external command,
2022-08-10 14:11:54,734 - supriya.server.protocol - INFO - Boot: operable program or batch file.
Traceback (most recent call last):
  File "E:\prg\Python39\lib\site-packages\supriya\realtime\protocols.py", line 61, in boot
    raise supriya.exceptions.ServerCannotBoot(line)
supriya.exceptions.ServerCannotBoot

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "E:\prg\Python39\lib\site-packages\supriya\realtime\servers.py", line 1033, in boot
    self._process_protocol.boot(self._options, scsynth_path, port)
  File "E:\prg\Python39\lib\site-packages\supriya\realtime\protocols.py", line 65, in boot
    process_group = os.getpgid(self.process.pid)
AttributeError: module 'os' has no attribute 'getpgid'

I have one windows 10 machine and one windows 11 machine here, so if you need to try things I'd be happy to help.

Thanks for the link.

The main thing that jumps out to me is the path it's trying to boot scsynth from: E:\prg\SuperCollider-3.12.2. I'm not 100% sure why that's the path being selected. I'm guessing that's a directory, not an executable, yeah? I would expect to see scsynth.exe somewhere in the path.

Did you do any kind of additional configuration before booting? I know Supriya's docs talk about setting a SCSYNTH_PATH environment variable. Anything along those lines?

Yes!

I did create a SCSYNTH_PATH environment variable pointing at the E:\prg\SuperCollider-3.12.2 dir. Changing it to E:\prg\SuperCollider-3.12.2\scsynth.exe and the server boots successfully 😀

>>> import supriya
>>> supriya._setup_logging("supriya.server")
>>> server = supriya.Server().boot()
2022-08-10 15:02:44,068 - supriya.server.protocol - INFO - Boot: E:\prg\SuperCollider-3.12.2\scsynth.exe -R 0 -l 1 -u 57110
2022-08-10 15:02:47,174 - supriya.server.protocol - INFO - Boot: Cannot connect to named pipe after wait = \\.\pipe\server_jack_default_0 err = 2
2022-08-10 15:02:47,174 - supriya.server.protocol - INFO - Boot: Cannot connect to server request channel
2022-08-10 15:02:47,174 - supriya.server.protocol - INFO - Boot: jack server is not running or cannot be started
2022-08-10 15:02:47,174 - supriya.server.protocol - INFO - Boot: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
2022-08-10 15:02:47,174 - supriya.server.protocol - INFO - Boot: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
2022-08-10 15:02:47,174 - supriya.server.protocol - INFO - Boot: Open error: is JACK server running?
2022-08-10 15:02:47,174 - supriya.server.protocol - INFO - Boot: jack_deactivate called with a NULL client
2022-08-10 15:02:47,174 - supriya.server.protocol - INFO - Boot: jack_deactivate called with a NULL client
2022-08-10 15:02:47,174 - supriya.server.protocol - INFO - Boot: jack_client_close called with a NULL client
2022-08-10 15:02:47,252 - supriya.server.protocol - INFO - Boot: Device options:
2022-08-10 15:02:47,252 - supriya.server.protocol - INFO - Boot:   - MME : Microsoft Sound Mapper - Input   (device #0 with 2 ins 0 outs)
2022-08-10 15:02:47,252 - supriya.server.protocol - INFO - Boot:   - MME : Microphone (Intel SST Audio Dev   (device #1 with 2 ins 0 outs)
2022-08-10 15:02:47,252 - supriya.server.protocol - INFO - Boot:   - MME : Microsoft Sound Mapper - Output   (device #2 with 0 ins 2 outs)
2022-08-10 15:02:47,252 - supriya.server.protocol - INFO - Boot:   - MME : Speakers/Headphones (Intel SST    (device #3 with 0 ins 2 outs)
2022-08-10 15:02:47,252 - supriya.server.protocol - INFO - Boot:   - MME : SMT27A550 (Intel SST Audio Devi   (device #4 with 0 ins 2 outs)
2022-08-10 15:02:47,252 - supriya.server.protocol - INFO - Boot:   - Windows DirectSound : Primary Sound Capture Driver   (device #5 with 2 ins 0 outs)
2022-08-10 15:02:47,252 - supriya.server.protocol - INFO - Boot:   - Windows DirectSound : Microphone (Intel SST Audio Device (WDM))   (device #6 with 2 ins 0 outs)
2022-08-10 15:02:47,252 - supriya.server.protocol - INFO - Boot:   - Windows DirectSound : Primary Sound Driver   (device #7 with 0 ins 2 outs)
2022-08-10 15:02:47,252 - supriya.server.protocol - INFO - Boot:   - Windows DirectSound : Speakers/Headphones (Intel SST Audio Device (WDM))   (device #8 with 0 ins 2 outs)
2022-08-10 15:02:47,268 - supriya.server.protocol - INFO - Boot:   - Windows DirectSound : SMT27A550 (Intel SST Audio Device (WDM))   (device #9 with 0 ins 2 outs)
2022-08-10 15:02:47,268 - supriya.server.protocol - INFO - Boot:   - ASIO : ReaRoute ASIO (x64)   (device #10 with 16 ins 16 outs)
2022-08-10 15:02:47,268 - supriya.server.protocol - INFO - Boot:   - Windows WASAPI : SMT27A550 (Intel SST Audio Device (WDM))   (device #11 with 0 ins 2 outs)
2022-08-10 15:02:47,268 - supriya.server.protocol - INFO - Boot:   - Windows WASAPI : Speakers/Headphones (Intel SST Audio Device (WDM))   (device #12 with 0 ins 2 outs)
2022-08-10 15:02:47,268 - supriya.server.protocol - INFO - Boot:   - Windows WASAPI : Microphone (Intel SST Audio Device (WDM))   (device #13 with 2 ins 0 outs)
2022-08-10 15:02:47,268 - supriya.server.protocol - INFO - Boot:   - Windows WDM-KS : Output (IntelSST Audio Wave for Hdmi)   (device #14 with 0 ins 2 outs)
2022-08-10 15:02:47,268 - supriya.server.protocol - INFO - Boot:   - Windows WDM-KS : Speakers (IntelSST Audio Wave for IHF)   (device #15 with 0 ins 2 outs)
2022-08-10 15:02:47,268 - supriya.server.protocol - INFO - Boot:   - Windows WDM-KS : Microphone (IntelSST Audio Wave for DMIC)   (device #16 with 2 ins 0 outs)
2022-08-10 15:02:47,268 - supriya.server.protocol - INFO - Boot: Requested devices:
2022-08-10 15:02:47,268 - supriya.server.protocol - INFO - Boot:   In:
2022-08-10 15:02:47,268 - supriya.server.protocol - INFO - Boot:   - (default)
2022-08-10 15:02:47,283 - supriya.server.protocol - INFO - Boot:   Out:
2022-08-10 15:02:47,283 - supriya.server.protocol - INFO - Boot:   - (default)
2022-08-10 15:02:47,283 - supriya.server.protocol - INFO - Boot: Selecting default system input/output devices
2022-08-10 15:02:47,283 - supriya.server.protocol - INFO - Boot: Booting with:
2022-08-10 15:02:47,283 - supriya.server.protocol - INFO - Boot:   In: MME : Microphone (Intel SST Audio Dev
2022-08-10 15:02:47,283 - supriya.server.protocol - INFO - Boot:   Out: MME : Speakers/Headphones (Intel SST
2022-08-10 15:02:47,424 - supriya.server.protocol - INFO - Boot:   Sample rate: 44100.000
2022-08-10 15:02:47,424 - supriya.server.protocol - INFO - Boot:   Latency (in/out): 0.013 / 0.091 sec
2022-08-10 15:02:47,424 - supriya.server.protocol - INFO - Boot: SC_AudioDriver: sample rate = 44100.000000, driver's block size = 64
2022-08-10 15:02:47,424 - supriya.server.protocol - INFO - Boot: SuperCollider 3 server ready.

I'll let you know if I run into any other issues.

Wow, amazing! There's definitely some path quoting problems in there, but I'm tackling that in #259

I suspect quitting the server will also raise an exception for you. Hoping to get that fixed with #259 as well. Looks like we can boot the server inside GitHub Actions on Windows, so should be testable.

And non-realtime synthesis will also fail due to path quoting.

@enchilada404 we've got a new release with https://github.com/josiah-wolf-oberholtzer/supriya/releases/tag/22.8b3.

The entire test suite now passes under Windows.

This is very nice 👍

Again, I'll let you know if anything strange happens...

Many thanks!