add tag
4 years ago Anonymous2183

I pulled this code from here: https://gist.github.com/teroka/0720274b87b77fe7171f

I made some changes: https://gist.github.com/teroka/0720274b87b77fe7171f#gistcomment-3911903

So the changed code:

The errors and updates that come after running the above - scroll to the last code block of the highlighted comment.

The error that come after running the above:

I have tried searching parts of errors but landed on nothing. Help is highly appreciated.

Also I tried making myself an API link(dunno if I made it correctly) by putting the api key and a working service tag to the URL and got something - and I can’t find the browser history for it. But it looked exacltly like this, which is what you get on the api.dell.com:

4 years
BlackJack — Friday, 19th Nov 2021 00:03

No it didn’t happen. Really it can’t. The chance this very fundamental and really extensively used command line options passing part doesn’t work is sooo small that we can safely assume it’s zero.

9 hours
Anonymous2183 — Thursday, 18th Nov 2021 15:02

btw, worst dev was the guy wrote this, not you…

Anonymous2183 replying to BlackJack — Thursday, 18th Nov 2021 15:02

then? something which couldn’t happen happened.

5 days
BlackJack — Saturday, 13th Nov 2021 15:47

That simply can’t be. If you call it with any argument, you can’t get an IndexError for accessing sys.argv[1] because that is where that argument ends up.

8 hours
Anonymous 2183 replying to BlackJack — Saturday, 13th Nov 2021 08:16

when I call it with the service tag: it gives that error. This dev is the worst.

2 days
BlackJack — Wednesday, 10th Nov 2021 20:26

When you don’t give any arguments then yes, of course it does. You are supposed to call that program with the service tag as argument.

10 hours
Anonymous 2183 replying to BlackJack — Wednesday, 10th Nov 2021 10:50

then it gives something like index out of range

19 hours
BlackJack — Tuesday, 9th Nov 2021 15:54

One error in the program is using sys.argv[0] as, I suppose svctag means service_tag. The first element of sys.argv is the script name, not a command line argument. Those start at index 1. As it was in the original, before you broke that.

Enter question or answer id or url (and optionally further answer ids/urls from the same question) from

Separate each id/url with a space. No need to list your own answers; they will be imported automatically.