A problem when running pipe_test.py

Hello everyone,

When I run pipe_test.py in a cmd window in Windows 10, everything goes fine (I think). However, when I ran it in Pycharm or spyder, I got the error shown below. Could anyone give me a hand to solve this problem?

Thanks ahead,

C:\Python27\python.exe C:/Python27/Audacity_pipeline/recording_test.py
recording-test.py, running on windows
Traceback (most recent call last):
Write to “\.\pipe\ToSrvPipe”
File “C:/Python27/Audacity_pipeline/recording_test.py”, line 37, in
Read from “\.\pipe\FromSrvPipe”
tofile = open(toname, ‘wt+’)
– Both pipes exist. Good.
IOError: [Errno 2] No such file or directory: ‘\\.\pipe\ToSrvPipe’

Process finished with exit code 1

One guess is that when you run code in the IDE, it is sandboxed to protect the system it is running on. That is, access to the outside world (including Audacity) is limited by the IDE.

If you put a “Try Except” around the read and write commands, I expect you will find that although the named pipe exists, it cannot be written to (and perhaps also not read from), from within the IDE.