Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSError: [Errno -9999] Unanticipated host error when running the program on command line #12

Open
iegl3 opened this issue Feb 11, 2025 · 0 comments

Comments

@iegl3
Copy link

iegl3 commented Feb 11, 2025

i got this error when i try to run my program via CMD command line. the program works well in VScode python debugger.

this is my command line for CMD:
C:\Users\localuser\Documents\GitHub\test-new>C:\Users\localuser\Documents\GitHub\test-new.venv\Scripts\python.exe C:\Users\localuser\Documents\GitHub\test-new\src\main\main_v5.py

and this is my vscode debug command line:
PS C:\Users\localuser\Documents\GitHub\test-new> c:; cd 'c:\Users\localuser\Documents\GitHub\test-new'; & 'c:\Users\localuser\Documents\GitHub\test-new.venv\Scripts\python.exe' 'c:\Users\localuser.vscode\extensions\ms-python.debugpy-2025.0.0-win32-x64\bundled\libs\debugpy\launcher' '52858' '--' 'C:\Users\localuser\Documents\GitHub\test-new\src\main\main_v5.py'

VScode debugger can run the program perfectly. here the result:
PROGRAM START
TEST

Connection success.

and here the result when i try to run the progam on cmd:
PROGRAM START
TEST

Connection success.
Traceback (most recent call last):
File "C:\Users\localuser\Documents\GitHub\test-new\src\main\main_v5.py", line 290, in
record_audio(pymc3e)
File "C:\Users\localuser\Documents\GitHub\test-new\src\main\main_v5.py", line 236, in record_audio
stream = p.open(format=FORMAT, channels=CHANNELS, rate=RATE, input=True, frames_per_buffer=CHUNK)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\localuser\Documents\GitHub\test-new.venv\Lib\site-packages\pyaudio_init_.py", line 639, in open
stream = PyAudio.Stream(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\localuser\Documents\GitHub\test-new.venv\Lib\site-packages\pyaudio_init_.py", line 441, in init
self.stream = pa.open(**arguments)
^^^^^^^^^^^^^^^^^^^^
OSError: [Errno -9999] Unanticipated host error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant