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

serial.py - sys.argv[1] index out of range #1

Open
Schmalvis opened this issue Oct 16, 2024 · 4 comments
Open

serial.py - sys.argv[1] index out of range #1

Schmalvis opened this issue Oct 16, 2024 · 4 comments

Comments

@Schmalvis
Copy link

I feel I must be doing something wrong here in executing the python script to pick-up the raw audio and send to a file. Have been following the detailed write-up for realtime ML audio suppression on Pico 2 in Magpi #146. However am hitting the same error here regardless of IDE or OS (tired on Windows 11 in VSCode and RPI5 w/ Geany, Thonny and VSCode).
Pyserial lib is installed in both cases. Debug shows nothing in sys.argv array

File "/home/pi/Workspace/rnnoise-examples-for-pico-2/examples/serial/serial_denoise.py", line 10, in
port = sys.argv[1]
IndexError: list index out of range

@sandeepmistry
Copy link
Member

hi @Schmalvis,

Could you please share the full command you are running?

@Schmalvis
Copy link
Author

this is probably where I'm going wrong. I'm not running a command, just 'running' the script via the IDE

@sandeepmistry
Copy link
Member

Ok, the script expects three arguments: the serial port, the input file path, and the output file path

@Schmalvis
Copy link
Author

ah ok, gotcha. I'm a complete newbie to this; was just following along with the magazine article trying to learn something new :)

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

2 participants