Python Expected One Argument

[Solved] Python Expected One Argument | Vb - Code Explorer | yomemimo.com
Question : python expected one argument

Answered by : charlesalexandre-roy

# Error: error: argument ... expected one argument
# Explanation:
# In my case, I was passing an argument that was meant as a comma-separated
#	list of numbers and the first number was negative, e.g.: -10,20. It seems
#	that the Argparse module had trouble interpreting the argument and was
#	treating the -10 as a new parameter such that the previous parameter was
#	getting no values, hence the "expected one argument" error.
# Solution
# To solve this I had to surround the argument with quotes and place a space
#	in front of the virst number, e.g.: " -10,20"

Source : https://bugs.python.org/issue47002 | Last Update : Tue, 13 Jun 23

Answers related to python expected one argument

Code Explorer Popular Question For Vb