charlesbel/Microsoft-Rewards-Farmer

[BUG] list index out of range

N0TKZ opened this issue · 15 comments

Before submitting a bug report...

  • This bug wasn't already reported.
    (I have checked every bug report on GitHub)

Title

  • The title is no longer "[BUG] Title" and I edited it with the right error name.

Describe the bug

it was working fine before this but i dont know what happened but it suddenly stops sending messages to my discord webhook and this error appear

Copy and paste your error

2023-11-15 19:51:05,990 [ERROR] IndexError: list index out of range
Traceback (most recent call last):
File "C:\Users\hasif\Downloads\Microsoft-Rewards-Farmer-master\Microsoft-Rewards-Farmer-master\main.py", line 24, in main
executeBot(currentAccount, notifier, args)
File "C:\Users\hasif\Downloads\Microsoft-Rewards-Farmer-master\Microsoft-Rewards-Farmer-master\main.py", line 139, in executeBot
) = desktopBrowser.utils.getRemainingSearches()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hasif\Downloads\Microsoft-Rewards-Farmer-master\Microsoft-Rewards-Farmer-master\src\utils.py", line 209, in getRemainingSearches
+ counters["pcSearch"][1]["pointProgress"]
~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

Screenshots

Value of dashboard variable

Same

edit: forget what I said previously, I forked and changed some things and now the script works wonderfully,

Take a look (or just clone it if u want) at the changes here: https://github.com/nicoacu/Microsoft-Rewards-Farmer/blob/8dd874c4853e787e754fe5bcf3a69480921de6dd/src/utils.py#L206-L216

edit: forget what I said previously, I forked and changed some things and now the script works wonderfully,

Take a look (or just clone it if u want) at the changes here: https://github.com/nicoacu/Microsoft-Rewards-Farmer/blob/8dd874c4853e787e754fe5bcf3a69480921de6dd/src/utils.py#L206-L216

I downloaded your fork and am still getting this error. I renamed my old folder and installed this in to the one it wanted. Went through the install steps. Even force reinstalled the chromedriver. Only thing I moved over from the old folder was the accounts file. Still getting same error.

I did notice on the MS page, the 20 bonus points for Edge is gone. Is that the issue? I only have 150 for search and 100 for mobile now.

edit: forget what I said previously, I forked and changed some things and now the script works wonderfully,
Take a look (or just clone it if u want) at the changes here: https://github.com/nicoacu/Microsoft-Rewards-Farmer/blob/8dd874c4853e787e754fe5bcf3a69480921de6dd/src/utils.py#L206-L216

I downloaded your fork and am still getting this error. I renamed my old folder and installed this in to the one it wanted. Went through the install steps. Even force reinstalled the chromedriver. Only thing I moved over from the old folder was the accounts file. Still getting same error.

I did notice on the MS page, the 20 bonus points for Edge is gone. Is that the issue? I only have 150 for search and 100 for mobile now.

I was having the same error so instead of copying the fork (you said it still gave you the error) I just replaced the utils.py file, and it works (sorta?)
image

edit: forget what I said previously, I forked and changed some things and now the script works wonderfully,
Take a look (or just clone it if u want) at the changes here: https://github.com/nicoacu/Microsoft-Rewards-Farmer/blob/8dd874c4853e787e754fe5bcf3a69480921de6dd/src/utils.py#L206-L216

I downloaded your fork and am still getting this error. I renamed my old folder and installed this in to the one it wanted. Went through the install steps. Even force reinstalled the chromedriver. Only thing I moved over from the old folder was the accounts file. Still getting same error.

I did notice on the MS page, the 20 bonus points for Edge is gone. Is that the issue? I only have 150 for search and 100 for mobile now.

yes the script needs to be changed as MS changed things no bonus points for using edge anymore see THIS ,Is it Utils.py that needs to be changed?

p.s nicoacu's utils.py seems to be working but doing too many searches (as mentioned above)its like multiplying them by 3,here in the EU
*latest yes I can confirm if you need 90 points it will search 90 times instead of the 30 (required for 3 points a search) for both desktop and mobile
something must be broken in the utils.py script or its the new changes by MS
@klept0 & @nicoacu can you fix this ,please?

@icescoop12 not a perfect fix by any means but I'm too lazy to understand the code further, so heres a lazy ass fix - on line 203 theres a default searchpoints value of 1, set it to your normal value (probably 3) and it'll do the right number of searches.

@icescoop12 not a perfect fix by any means but I'm too lazy to understand the code further, so heres a lazy ass fix - on line 203 theres a default searchpoints value of 1, set it to your normal value (probably 3) and it'll do the right number of searches.

If you mean in the utils.py file, this seems to break my instance to the point I have to delete the session files.

@icescoop12 not a perfect fix by any means but I'm too lazy to understand the code further, so heres a lazy ass fix - on line 203 theres a default searchpoints value of 1, set it to your normal value (probably 3) and it'll do the right number of searches.

If you mean in the utils.py file, this seems to break my instance to the point I have to delete the session files.

That change would be in addition to the changes to the util.py from way up top, it'd only correct the issue with searching too many times not anything else

@icescoop12 not a perfect fix by any means but I'm too lazy to understand the code further, so heres a lazy ass fix - on line 203 theres a default searchpoints value of 1, set it to your normal value (probably 3) and it'll do the right number of searches.

Thanks ventec247 ,that has fixed the too many searches problems
Only thing now the bot is a bit sketchy at the moment like hanging on logging in occasionally,time-outs on searching
It’s either my proxy or the new searching setup ms has implemented

icescoop12for the too many searches i fixed the problem with changing this(i have modified the 55 in 90 so its doing the right math) of the too many searches in the utils file you need to put this code:
elif targetDesktop == 90 or targetDesktop >= 170:
# Level 1 or 2 US
searchPoints = 3

icescoop12for the too many searches i fixed the problem with changing this(i have modified the 55 in 90 so its doing the right math) of the too many searches in the utils file you need to put this code: elif targetDesktop == 90 or targetDesktop >= 170: # Level 1 or 2 US searchPoints = 3

Thanks for the proper fix to it :)

edit: forget what I said previously, I forked and changed some things and now the script works wonderfully,
Take a look (or just clone it if u want) at the changes here: https://github.com/nicoacu/Microsoft-Rewards-Farmer/blob/8dd874c4853e787e754fe5bcf3a69480921de6dd/src/utils.py#L206-L216

I downloaded your fork and am still getting this error. I renamed my old folder and installed this in to the one it wanted. Went through the install steps. Even force reinstalled the chromedriver. Only thing I moved over from the old folder was the accounts file. Still getting same error.
I did notice on the MS page, the 20 bonus points for Edge is gone. Is that the issue? I only have 150 for search and 100 for mobile now.

yes the script needs to be changed as MS changed things no bonus points for using edge anymore see THIS ,Is it Utils.py that needs to be changed?

p.s nicoacu's utils.py seems to be working but doing too many searches (as mentioned above)its like multiplying them by 3,here in the EU *latest yes I can confirm if you need 90 points it will search 90 times instead of the 30 (required for 3 points a search) for both desktop and mobile something must be broken in the utils.py script or its the new changes by MS @klept0 & @nicoacu can you fix this ,please?

Making this change worked for me, it will do 30 desktop Bing searches and 20 mobile ones for 5 points each.

    elif targetDesktop == 5 or targetDesktop >= 6:
        # Level 1 or 2 US
        searchPoints = 5

File with all needed changes here

Making this change worked for me, it will do 30 desktop Bing searches and 20 mobile ones for 5 points each.

    elif targetDesktop == 5 or targetDesktop >= 6:
        # Level 1 or 2 US
        searchPoints = 5`

File with all needed changes here

What to do for non US regions where you get 3 points for each search and 30 max searches for pc and 20 for mobile.

problem is ,might be newer version of chrome but always gets stuck at login now ?

problem is ,might be newer version of chrome but always gets stuck at login now ?

Close all of your python and chrome processes in task manager and rerun the script, worked for me.