KBNLresearch / iromlab

Loader software for automated imaging of optical media with Nimbie disc robot
Apache License 2.0
31 stars 5 forks source link

dbpoweramp raises OSError: [WinError 87] #34

Closed bitsgalore closed 7 years ago

bitsgalore commented 7 years ago

Dbpoweramp runs as expected when dbpoweramp.py is run directly as a script, but in iromlab (where it runs in the worker thread) it causes an exception in Popen :

Exception in thread Thread-3:
Traceback (most recent call last):
  File "c:\python36\lib\threading.py", line 916, in _bootstrap_inner
    self.run()
  File "c:\python36\lib\threading.py", line 864, in run
    self._target(*self._args, **self._kwargs)
  File "f:\johan\pythonCode\iromlab\iromlab\cdworker.py", line 455, in cdWorker
    success = processDisc(carrierData)
  File "f:\johan\pythonCode\iromlab\iromlab\cdworker.py", line 174, in processDi
sc
    resultdBpoweramp = dbpoweramp.consoleRipper(dirOut)
  File "f:\johan\pythonCode\iromlab\iromlab\dbpoweramp.py", line 34, in consoleR
ipper
    status, out, err = shared.launchSubProcess(args)
  File "f:\johan\pythonCode\iromlab\iromlab\shared.py", line 17, in launchSubPro
cess
    p = sub.Popen(args,stdout=sub.PIPE,stderr=sub.PIPE)
  File "c:\python36\lib\subprocess.py", line 707, in __init__
    restore_signals, start_new_session)
  File "c:\python36\lib\subprocess.py", line 990, in _execute_child
    startupinfo)
OSError: [WinError 87] The parameter is incorrect

Perhaps something to do with threading? See for example:

http://stackoverflow.com/questions/21194380/is-subprocess-popen-not-thread-safe

Also:

https://github.com/pytest-dev/py/issues/103

http://stackoverflow.com/questions/32379953/oserror-winerror87-the-parameter-is-incorrect

bitsgalore commented 7 years ago

Cause of this was that config.dBpowerampConsoleRipExe returned empty string in dbpoweramp.py. After some fiddling around it now works in https://github.com/KBNLresearch/iromlab/commit/3865a16400466d3a7bc5ca1e2ddbb7795b9335e2, even though I'm not sure why it didn't work before and why it does work now!