DinoRunTutorial icon indicating copy to clipboard operation
DinoRunTutorial copied to clipboard

Selenium and dino game

Open Tejas-Haritsa-vk opened this issue 4 years ago • 9 comments

Hi, While trying to open 'chrome://dino' url in selenium, it is throwing the following error:

WebDriverException Traceback (most recent call last) in ----> 1 driver.get("chrome://dino/")

F:\Anaconda\envs\opencv\lib\site-packages\selenium\webdriver\remote\webdriver.py in get(self, url) 331 Loads a web page in the current browser session. 332 """ --> 333 self.execute(Command.GET, {'url': url}) 334 335 @property

F:\Anaconda\envs\opencv\lib\site-packages\selenium\webdriver\remote\webdriver.py in execute(self, driver_command, params) 319 response = self.command_executor.execute(driver_command, params) 320 if response: --> 321 self.error_handler.check_response(response) 322 response['value'] = self._unwrap_value( 323 response.get('value', None))

F:\Anaconda\envs\opencv\lib\site-packages\selenium\webdriver\remote\errorhandler.py in check_response(self, response) 240 alert_text = value['alert'].get('text') 241 raise exception_class(message, screen, stacktrace, alert_text) --> 242 raise exception_class(message, screen, stacktrace) 243 244 def _value_or_default(self, obj, key, default):

WebDriverException: Message: unknown error: net::ERR_INTERNET_DISCONNECTED

i tried googling for a solution but, couldn't find any that fixed the issue. Kindly help me resolve this.

Tejas-Haritsa-vk avatar Oct 28 '20 15:10 Tejas-Haritsa-vk

I have the same problem as Tejas-Haritsa-vk. Have you solved the problem?

tfppcn avatar Nov 27 '20 06:11 tfppcn

I have the same problem as Tejas-Haritsa-vk. Have you solved the problem?

Hi, tfppcn. I have resolved this issue by using the folloing lines of code:

from selenium.common.exceptions import WebDriverException

try: driver.get(game_url) except WebDriverException: pass

Tejas-Haritsa-vk avatar Nov 27 '20 07:11 Tejas-Haritsa-vk

Thank you Tejas, I've finally got it to work with your help. It runs very slowly on my laptop without GPU but at least it runs. What is the highest score you got? Is it possible to copy a trained model.h5 and use it to speed up the learning?

tfppcn avatar Nov 27 '20 11:11 tfppcn

Thank you Tejas, I've finally got it to work with your help. It runs very slowly on my laptop without GPU but at least it runs. What is the highest score you got? Is it possible to copy a trained model.h5 and use it to speed up the learning?

you are welcome @tfppcn, yes it is possible to speed up training using a pre trained model. I haven't trained it for long yet hence no score, the only 2 time I ran it scored around 140-160.

Tejas-Haritsa-vk avatar Nov 27 '20 11:11 Tejas-Haritsa-vk

Thank you Tejas, I've finally got it to work with your help. It runs very slowly on my laptop without GPU but at least it runs. What is the highest score you got? Is it possible to copy a trained model.h5 and use it to speed up the learning?

Hi @Tejas-Haritsa-vk , do you happen to know the root cause of the issue?

ravi72munde avatar Dec 09 '20 18:12 ravi72munde

I’m not sure but looking at the error messages, I guess that selenium is not happy about the web browser being offline. Tejas’s solution of error handling that with an exception worked. Perhaps selenium has been updated since the last time you ran it.


From: Ravi Munde [email protected] Sent: Thursday, December 10, 2020 5:33:39 AM To: Paperspace/DinoRunTutorial [email protected] Cc: tfppcn [email protected]; Mention [email protected] Subject: Re: [Paperspace/DinoRunTutorial] Selenium and dino game (#12)

Thank you Tejas, I've finally got it to work with your help. It runs very slowly on my laptop without GPU but at least it runs. What is the highest score you got? Is it possible to copy a trained model.h5 and use it to speed up the learning?

Hi @tfppcnhttps://github.com/tfppcn , do you happen to know the root cause of the issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Paperspace/DinoRunTutorial/issues/12#issuecomment-741966414, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ANTSTCUG7ZWXAJUPHV3N4J3ST67IHANCNFSM4TCOSZOQ.

tfppcn avatar Dec 10 '20 02:12 tfppcn

Hi,

I don't think it is due to selenium update at all as I tried the same selenium package on two different systems and one worked and the other didn't. So, I think it is more connected towards the particular system firewall and security settings maybe. Not 100% sure though, as I checked my firewall and it was allowing python. Hope this helps.

  • with regards Tejas Haritsa V K

On Thu, Dec 10, 2020, 8:09 AM tfppcn [email protected] wrote:

I’m not sure but looking at the error messages, I guess that selenium is not happy about the web browser being offline. Tejas’s solution of error handling that with an exception worked. Perhaps selenium has been updated since the last time you ran it.


From: Ravi Munde [email protected] Sent: Thursday, December 10, 2020 5:33:39 AM To: Paperspace/DinoRunTutorial [email protected] Cc: tfppcn [email protected]; Mention [email protected] Subject: Re: [Paperspace/DinoRunTutorial] Selenium and dino game (#12)

Thank you Tejas, I've finally got it to work with your help. It runs very slowly on my laptop without GPU but at least it runs. What is the highest score you got? Is it possible to copy a trained model.h5 and use it to speed up the learning?

Hi @tfppcnhttps://github.com/tfppcn , do you happen to know the root cause of the issue?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub< https://github.com/Paperspace/DinoRunTutorial/issues/12#issuecomment-741966414>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ANTSTCUG7ZWXAJUPHV3N4J3ST67IHANCNFSM4TCOSZOQ

.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Paperspace/DinoRunTutorial/issues/12#issuecomment-742197317, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOSTLU347VGX2QXP7ZPLPZLSUAYFXANCNFSM4TCOSZOQ .

Tejas-Haritsa-vk avatar Dec 10 '20 02:12 Tejas-Haritsa-vk

I have the same problem as Tejas-Haritsa-vk. Have you solved the problem?

Hi, tfppcn. I have resolved this issue by using the folloing lines of code:

from selenium.common.exceptions import WebDriverException

try: driver.get(game_url) except WebDriverException: pass

I confirm that this tweak helped me to run the project.

Thanks!

nicosquare avatar Oct 27 '21 08:10 nicosquare

The suggestion by @Tejas-Haritsa-vk worked for me to get the project running. I am not able to get the program to jump after the observation period. And advice anyone?

BlaineOmega avatar May 31 '22 20:05 BlaineOmega