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

[BUG] list index out of range #401

Closed
2 tasks done
N0TKZ opened this issue Nov 15, 2023 · 15 comments · Fixed by #405
Closed
2 tasks done

[BUG] list index out of range #401

N0TKZ opened this issue Nov 15, 2023 · 15 comments · Fixed by #405
Labels
bug Something isn't working

Comments

@N0TKZ
Copy link

N0TKZ commented Nov 15, 2023

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

@N0TKZ N0TKZ added the bug Something isn't working label Nov 15, 2023
@binhphuon
Copy link

Same

@nicoacu
Copy link
Contributor

nicoacu commented Nov 21, 2023

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

@Lectoid
Copy link

Lectoid commented Nov 28, 2023

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.

@Infern0Tempest
Copy link

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

@icescoop12
Copy link

icescoop12 commented Nov 28, 2023

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?

@Ventec247
Copy link

@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.

@Lectoid
Copy link

Lectoid commented Nov 29, 2023

@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.

@Ventec247
Copy link

@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
Copy link

@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

@neve360
Copy link

neve360 commented Dec 1, 2023

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

@Ventec247
Copy link

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 :)

@s327887
Copy link

s327887 commented Dec 1, 2023

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

@abuudarda
Copy link

abuudarda commented Dec 2, 2023

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.

@icescoop12
Copy link

icescoop12 commented Dec 2, 2023

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

@s327887
Copy link

s327887 commented Dec 2, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants