• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: PYTHON – TRY: ARGV STILL ERRORS OUT

Resolved: PYTHON – TRY: ARGV STILL ERRORS OUT

0
By Isaac Tonny on 18/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

Just trying to handle some IndexError while using sys. Searched a lot on how to do it, and I’ve come to a final “solution”, but I don’t know why it’s not working.
Actual code
Output
I don’t know why it errors out, since I have set previously the sys.argv[1] inside the try block
Could anyone help me out on this?

Answer:

The issue comes from the t and u definitions above the two try blocks. Get rid of those and keep your try blocks and you should be good.

If you have better answer, please add a comment about this, thank you!

argv index-error python-3.x sys
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: std::regex_replace to replace multiple combinations

26/03/2023

Resolved: How can I copy files using the ansible.builtin.copy module and avoid conflicting file names?

26/03/2023

Resolved: Reshape tensors of unknown shape with tf.function

26/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.