mod-script-pipe

Audio software developers forum.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
andrictt
Posts: 1
Joined: Tue Oct 01, 2019 4:16 pm
Operating System: Windows 10

Re: mod-script-pipe

Post by andrictt » Tue Oct 01, 2019 4:19 pm

What is happening here?

pipe-test.py, running on windows
Traceback (most recent call last):
Write to "\\.\pipe\ToSrvPipe"
Read from "\\.\pipe\FromSrvPipe"
-- Both pipes exist. Good.
File "C:\Users\lia7952\PycharmProjects\AudacityTest\pipe-test.py", line 44, in <module>
TOFILE = open(TONAME, 'w')
OSError: [Errno 22] Invalid argument: '\\\\.\\pipe\\ToSrvPipe'

steve
Site Admin
Posts: 81257
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: mod-script-pipe

Post by steve » Tue Oct 01, 2019 4:38 pm

andrictt wrote:
Tue Oct 01, 2019 4:19 pm
What is happening here?

pipe-test.py, running on windows
Traceback (most recent call last):
Write to "\\.\pipe\ToSrvPipe"
Read from "\\.\pipe\FromSrvPipe"
-- Both pipes exist. Good.
File "C:\Users\lia7952\PycharmProjects\AudacityTest\pipe-test.py", line 44, in <module>
TOFILE = open(TONAME, 'w')
OSError: [Errno 22] Invalid argument: '\\\\.\\pipe\\ToSrvPipe'
Which version of Audacity, which version of Windows, and which version of Python?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

diegogliarte
Posts: 1
Joined: Mon Aug 17, 2020 3:44 pm
Operating System: Windows 10

Re: mod-script-pipe

Post by diegogliarte » Mon Aug 17, 2020 3:51 pm

I was getting this error:
Traceback (most recent call last):
File "E:/Documents/Programming/Python/audacity/pipe_test.py", line 44, in <module>
TOFILE = open(TONAME, 'w')
OSError: [Errno 22] Invalid argument: '\\\\.\\pipe\\ToSrvPipe'
pipe-test.py, running on windows
Write to "\\.\pipe\ToSrvPipe"
Read from "\\.\pipe\FromSrvPipe"
-- Both pipes exist. Good.
When I pasted on Google, this is the first page that poped up, so I'm writting my solution here just in case someone is as lost as I was. I solved it by sleeping just before the open statement, like this:

Code: Select all

print("-- Both pipes exist.  Good.")
sleep(0.01)
TOFILE = open(TONAME, 'w')
Remember to import the function:

Code: Select all

from time import sleep

era
Posts: 1
Joined: Sat Feb 13, 2021 4:18 pm
Operating System: Windows 10

Re: mod-script-pipe

Post by era » Sat Feb 13, 2021 4:20 pm

commenting out the os.path.exists lines so that it goes straight to open worked for me. I think os.path.esists has a bug in it or something when dealing with pipes. python3.8

Eddy White
Posts: 2
Joined: Sat Feb 27, 2021 12:02 pm
Operating System: Windows 10

Re: mod-script-pipe

Post by Eddy White » Sun Feb 28, 2021 5:49 am

era wrote:
Sat Feb 13, 2021 4:20 pm
commenting out the os.path.exists lines so that it goes straight to open worked for me. I think os.path.esists has a bug in it or something when dealing with pipes. python3.8
Yes i am having the same issue. I also feel os.pth certainly has a bug

steve
Site Admin
Posts: 81257
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: mod-script-pipe

Post by steve » Sun Feb 28, 2021 12:55 pm

Eddy White wrote:
Sun Feb 28, 2021 5:49 am
Yes i am having the same issue. I also feel os.pth certainly has a bug
Which Python script are you referring to?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply