Open avallintine opened 4 months ago
Tried increasing timeout on line 459 to 20 seconds and disabling Windows Firewall, but no luck.
Also tried increasing global timeout:
scn.startup(timeout=20)
But it still times out when waiting for a response from sclang.
Not sure if this helps identify the problem, but while running the same code in VS Code I am getting a different error:
Starting sclang process... [sclang | start reading ]
Done.
Registering OSC /return callback in sclang... Timeout while reading sclang
expected: "->" (sclang return value)
output until timeout below: (also see console)
----------------------------------------------
sc3> "sc3nb - Registering OSC /return callback".postln; r = r ? (); r.callback = { arg code, ip, port; var result = code.interpret; var addr = NetAddr.new(ip, port); var prependSize = { arg elem; if (elem.class == Array){ elem = [elem.size] ++ elem.collect(prependSize); }{ elem; }; }; var msgContent = prependSize.value(result); addr.sendMsg("ReplyAddress.RETURN_ADDR", msgContent); result; };
sc3nb - Registering OSC /return callback
-> ( 'callback': a Function )
sc3>
Traceback (most recent call last):
File "c:\Users\avallintine\Anaconda3\envs\supercollider_foo\Lib\site-packages\sc3nb\sc.py", line 214, in start_sclang
self._sclang.start(
File "c:\Users\avallintine\Anaconda3\envs\supercollider_foo\Lib\site-packages\sc3nb\sclang.py", line 121, in start
self.init()
File "c:\Users\avallintine\Anaconda3\envs\supercollider_foo\Lib\site-packages\sc3nb\sclang.py", line 131, in init
self.cmds(
File "c:\Users\avallintine\Anaconda3\envs\supercollider_foo\Lib\site-packages\sc3nb\sclang.py", line 338, in cmds
return self.cmd(code, verbose=False, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\avallintine\Anaconda3\envs\supercollider_foo\Lib\site-packages\sc3nb\sclang.py", line 319, in cmd
out = self.read(expect=self._repl_return, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\avallintine\Anaconda3\envs\supercollider_foo\Lib\site-packages\sc3nb\sclang.py", line 384, in read
raise timeout_error
File "c:\Users\avallintine\Anaconda3\envs\supercollider_foo\Lib\site-packages\sc3nb\sclang.py", line 371, in read
return self.process.read(expect=expect, timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\avallintine\Anaconda3\envs\supercollider_foo\Lib\site-packages\sc3nb\process_handling.py", line 247, in read
raise ProcessTimeout(
sc3nb.process_handling.ProcessTimeout: Reading of sclang timed out after 1s while expecting: "->"
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "D:\projects\supercollider_foo\sc3nb_foo.py", line 3, in <module>
sc = scn.startup(timeout=20)
^^^^^^^^^^^^^^^^^^^^^^^
File "c:\Users\avallintine\Anaconda3\envs\supercollider_foo\Lib\site-packages\sc3nb\sc.py", line 67, in startup
SC.default = SC(
^^^
File "c:\Users\avallintine\Anaconda3\envs\supercollider_foo\Lib\site-packages\sc3nb\sc.py", line 170, in __init__
self.start_sclang(
File "c:\Users\avallintine\Anaconda3\envs\supercollider_foo\Lib\site-packages\sc3nb\sc.py", line 222, in start_sclang
raise RuntimeError(f"Starting sclang failed - {excep}") from excep
RuntimeError: Starting sclang failed - Reading of sclang timed out after 1s while expecting: "->"
[sclang | reached EOF ]
Exiting sclang... Done.
Sorry for the late reply. I hope this still helps!
This seems to be the following issue - https://github.com/interactive-sonification/sc3nb/issues/18
Please install and try using the development version by using
pip install git+https://github.com/interactive-sonification/sc3nb.git@develop
That worked. Thanks!
this also fixes it on OSX, apparently. Thanks!
Windows 10 Pro, Python 3.11.9, SuperCollider 3.13.0.
Also tested with Python 3.12 and SuperCollider 3.12.2 and 3.11.2 with same outcome.
Haven't had any problems using SuperCollider through the IDE.
Tried increasing timeout on line 459 to 20 seconds and disabling Windows Firewall, but no luck.
Please help :)
Output of IPython session: