PanagiotisIatrou / chess-auto-bot

A bot for chess.com and lichess.org that automatically plays chess for you
MIT License
72 stars 26 forks source link

Chess.com fix #55

Closed MarcusM2092 closed 5 months ago

PanagiotisIatrou commented 6 months ago

Hello @MarcusM2092,

When I try to run the "Cant find Chrome. You need to have Chrome installed for this to work." pops up. In a closer look what is probably causing the issue is the fact that you have hardcoded this line:

options.add_argument(r"--user-data-dir=C:\Users\marcus\AppData\Local\Google\Chrome\User Data")

which is not working for users other than marcus and also it is not OS independent. I understand this can be a bit hard to solve, so I suggest you revoke the changes regarding the autosave function so that I can push the fixes for chess.com that are working as expected. You can always just make another PR in the future with this feature.

SxBgHjSjolqCZxD commented 6 months ago

@MarcusM2092 Do you have any idea how to fix this? I changed the hardcoded values to my directory, but it still says, 'Can't find Chrome. You need to have Chrome installed for this to work.' However, after running 'pip install --upgrade webdriver-manager,' it now opens the browser in the directory I hardcoded. Despite this, it doesn't recognize it as a browser, and I still get the error 'Can't find Chrome. You need to have Chrome installed for this to work,' even with the browser open.

MarcusM2092 commented 6 months ago

Hello @MarcusM2092,

When I try to run the "Cant find Chrome. You need to have Chrome installed for this to work." pops up. In a closer look what is probably causing the issue is the fact that you have hardcoded this line:

options.add_argument(r"--user-data-dir=C:\Users\marcus\AppData\Local\Google\Chrome\User Data")

which is not working for users other than marcus and also it is not OS independent. I understand this can be a bit hard to solve, so I suggest you revoke the changes regarding the autosave function so that I can push the fixes for chess.com that are working as expected. You can always just make another PR in the future with this feature.

i can just upload my changes I've made so far then you can go of that

MarcusM2092 commented 6 months ago

heres a link to download it because github can be a pain sometimes https://drive.google.com/drive/folders/1lcns12bJxjpq5dzEhKLDeoZeQrznQAc9?usp=sharing

MarcusM2092 commented 6 months ago

@MarcusM2092 Do you have any idea how to fix this? I changed the hardcoded values to my directory, but it still says, 'Can't find Chrome. You need to have Chrome installed for this to work.' However, after running 'pip install --upgrade webdriver-manager,' it now opens the browser in the directory I hardcoded. Despite this, it doesn't recognize it as a browser, and I still get the error 'Can't find Chrome. You need to have Chrome installed for this to work,' even with the browser open.

you need to download chrome and install it

SxBgHjSjolqCZxD commented 6 months ago

@MarcusM2092 Do you have any idea how to fix this? I changed the hardcoded values to my directory, but it still says, 'Can't find Chrome. You need to have Chrome installed for this to work.' However, after running 'pip install --upgrade webdriver-manager,' it now opens the browser in the directory I hardcoded. Despite this, it doesn't recognize it as a browser, and I still get the error 'Can't find Chrome. You need to have Chrome installed for this to work,' even with the browser open.

you need to download chrome and install it

I obviously have Chrome installed. I mentioned that Chrome opened when I updated webdriver-manager and the hard-coded values, but the error still appears, which is why I'm confused. If it's working for you, may I know the version of Chrome you have installed? I have the latest version, which is 123.0.6312.59 (Official Build) (64-bit).

PanagiotisIatrou commented 6 months ago

heres a link to download it because github can be a pain sometimes https://drive.google.com/drive/folders/1lcns12bJxjpq5dzEhKLDeoZeQrznQAc9?usp=sharing

You have to make another commit to this PR revoking the changes regarding auto save. It is really hard for me to figure out what differences the code in the link you sent has, and it is not as simple as copying and pasting.

SxBgHjSjolqCZxD commented 5 months ago

@MarcusM2092 Do you have any idea how to fix this? I changed the hardcoded values to my directory, but it still says, 'Can't find Chrome. You need to have Chrome installed for this to work.' However, after running 'pip install --upgrade webdriver-manager,' it now opens the browser in the directory I hardcoded. Despite this, it doesn't recognize it as a browser, and I still get the error 'Can't find Chrome. You need to have Chrome installed for this to work,' even with the browser open.

you need to download chrome and install it

I obviously have Chrome installed. I mentioned that Chrome opened when I updated webdriver-manager and the hard-coded values, but the error still appears, which is why I'm confused. If it's working for you, may I know the version of Chrome you have installed? I have the latest version, which is 123.0.6312.59 (Official Build) (64-bit).

Nvm its working for me now, i modified the code a bit

PanagiotisIatrou commented 5 months ago

Hello @MarcusM2092,

I removed the auto save feature so that I can push the fixes for chess.com. You can always make another PR with that feature if you want.

I also renamed some variables, reformatted some code, readded the window icon and reset some of the configuration values you changed, aiming for a base version that works seamlessly with low spec PC's as well.

Thank you for your support to this project