Operating system: Windows (6.1.7601)
Slicer version: 4.10.0
Expected behavior: Load in python package to slicer, package is loaded, use package in scripted module to access and load an external audio data file.
Actual behavior: Load in python package to slicer, package is loaded, script loaded module cannot locate external file.
Hello,
I am trying to implement a specific sound feedback in Slicer to play a specific audio file in response to an observed change in a node. I am attempting to use the python module pydub. I have imported this into slicer using the following:
import pip
pip.main(‘install’, ‘pydub’)
The module is loaded into Slicer, but when I attempt to use this module to access an external .wav file
it fails to recognize the file (Windows Error 2, the file or directory does not exist. is this an issue with Slicer being able to open a file called by an external command? If anyone has an insight into why I may be getting this issue I would greatly appreciate your input.
Also, the use of Qt in python would require some form of C++ wrapping would it not? I know that the PyQT provides binding for Qt but I am not sure if I would be able to use this within Slicer.
Yes, Qt already have python-wrapping in Slicer using PythonQt. You can see in the OpenSoundControl python module here where the python wrapped qt package is imported.
I would suggest to keep debugging that issue with the subprocess call within the OpenSoundControl extension code. I wouldn’t be surprised if the config file path is in an incorrect format. Maybe you have quotes around the path when there shouldn’t be? I haven’t tried anything myself, but giving you some ideas to try.
Thanks for the suggestions! I appreciate your support. The error I am getting is actually when I just use the built in Open Sound Control module under Modules>IGT>Open Sound Control. When i go under the PureData Server input section and add the PureData configuration for the OscSimpleTest and then it gives the error I discussed. I have tried several different iterations or ways of expressing the path for the OscSimpleTest.pd file and none seem to work I still get the same Error 87.
Additionally, I ran the OscSimpleTest just within Purr-Data, it is producing sound but outputting these errors: