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

Selenium and dino game #12

Open
Tejas-Haritsa-vk opened this issue Oct 28, 2020 · 9 comments
Open

Selenium and dino game #12

Tejas-Haritsa-vk opened this issue Oct 28, 2020 · 9 comments

Comments

@Tejas-Haritsa-vk
Copy link

Tejas-Haritsa-vk commented Oct 28, 2020

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.

@tfppcn
Copy link

tfppcn commented Nov 27, 2020

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

@Tejas-Haritsa-vk
Copy link
Author

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

@tfppcn
Copy link

tfppcn commented Nov 27, 2020

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?

@Tejas-Haritsa-vk
Copy link
Author

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.

@ravi72munde
Copy link
Collaborator

ravi72munde commented Dec 9, 2020

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?

@tfppcn
Copy link

tfppcn commented Dec 10, 2020 via email

@Tejas-Haritsa-vk
Copy link
Author

Tejas-Haritsa-vk commented Dec 10, 2020 via email

@nicosquare
Copy link

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!

@BlaineOmega
Copy link

BlaineOmega commented May 31, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants