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

Help #43

Open
eyjge opened this issue Aug 17, 2021 · 8 comments
Open

Help #43

eyjge opened this issue Aug 17, 2021 · 8 comments

Comments

@eyjge
Copy link

eyjge commented Aug 17, 2021

root@instance-20210712-1350:/home/ubuntu/YeetMeet# pip install -r requirements.txt
Requirement already satisfied: attrs==19.3.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 1)) (19.3.0)
Requirement already satisfied: blinker==1.4 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 2)) (1.4)
Requirement already satisfied: certifi==2019.11.28 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 3)) (2019.11.28)
Requirement already satisfied: chardet==3.0.4 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 4)) (3.0.4)
Requirement already satisfied: cloud-init==21.2 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 5)) (21.2)
Requirement already satisfied: colorama==0.4.4 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 6)) (0.4.4)
Requirement already satisfied: configobj==5.0.6 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 7)) (5.0.6)
Requirement already satisfied: cryptography==2.8 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 8)) (2.8)
Requirement already satisfied: cupshelpers==1.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 9)) (1.0)
Requirement already satisfied: dbus-python==1.2.16 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 10)) (1.2.16)
Requirement already satisfied: decorator==5.0.9 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 11)) (5.0.9)Requirement already satisfied: defer==1.0.6 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 12)) (1.0.6)
Requirement already satisfied: distro==1.4.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 13)) (1.4.0)
Requirement already satisfied: distro-info===0.23ubuntu1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 14)) (0.23ubuntu1)
Requirement already satisfied: entrypoints==0.3 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 15)) (0.3)
Requirement already satisfied: future==0.18.2 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 16)) (0.18.2)
Requirement already satisfied: httplib2==0.14.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 17)) (0.14.0)
Requirement already satisfied: idna==2.8 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 18)) (2.8)
Requirement already satisfied: importlib-metadata==1.5.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 19)) (1.5.0)
Requirement already satisfied: Jinja2==2.10.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 20)) (2.10.1)
Requirement already satisfied: jsonpatch==1.22 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 21)) (1.22)
Requirement already satisfied: jsonpointer==2.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 22)) (2.0)
Requirement already satisfied: jsonschema==3.2.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 23)) (3.2.0)
Requirement already satisfied: keyring==18.0.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 24)) (18.0.1)
Requirement already satisfied: language-selector==0.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 25)) (0.1)
Requirement already satisfied: launchpadlib==1.10.13 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 26)) (1.10.13)
Requirement already satisfied: lazr.restfulclient==0.14.2 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 27)) (0.14.2)
Requirement already satisfied: lazr.uri==1.0.3 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 28)) (1.0.3)
Requirement already satisfied: macaroonbakery==1.3.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 29)) (1.3.1)
Requirement already satisfied: MarkupSafe==1.1.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 30)) (1.1.0)
Requirement already satisfied: more-itertools==4.2.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 31)) (4.2.0)
Requirement already satisfied: netifaces==0.10.4 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 32)) (0.10.4)
Requirement already satisfied: oauthlib==3.1.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 33)) (3.1.0)
Requirement already satisfied: pause==0.2 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 34)) (0.2)
Requirement already satisfied: pbr==5.6.0 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 35)) (5.6.0)
Requirement already satisfied: pexpect==4.6.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 36)) (4.6.0)
Requirement already satisfied: protobuf==3.6.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 37)) (3.6.1)
Requirement already satisfied: psutil==5.7.2 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 38)) (5.7.2)
Requirement already satisfied: pycairo==1.16.2 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 39)) (1.16.2)
Requirement already satisfied: pycups==1.9.73 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 40)) (1.9.73)
Requirement already satisfied: PyGObject==3.36.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 41)) (3.36.0)
Requirement already satisfied: PyJWT==1.7.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 42)) (1.7.1)
Requirement already satisfied: pylivestream==1.11.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 43)) (1.11.1)
Requirement already satisfied: pymacaroons==0.13.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 44)) (0.13.0)
Requirement already satisfied: PyNaCl==1.3.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 45)) (1.3.0)
Requirement already satisfied: pyOpenSSL==19.0.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 46)) (19.0.0)
Requirement already satisfied: pyRFC3339==1.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 47)) (1.1)
Requirement already satisfied: pyrsistent==0.15.5 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 48)) (0.15.5)
Requirement already satisfied: pyserial==3.4 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 49)) (3.4)
Requirement already satisfied: pyte==0.8.0 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 50)) (0.8.0)
Requirement already satisfied: python-apt==2.0.0+ubuntu0.20.4.5 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 51)) (2.0.0+ubuntu0.20.4.5)
Requirement already satisfied: python-debian===0.1.36ubuntu1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 52)) (0.1.36ubuntu1)
Requirement already satisfied: python-telegram-bot==12.5.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 53)) (12.5.1)
Requirement already satisfied: pytz==2019.3 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 54)) (2019.3)
Requirement already satisfied: pyxattr==0.6.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 55)) (0.6.1)
Requirement already satisfied: PyYAML==5.3.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 56)) (5.3.1)
Requirement already satisfied: requests==2.22.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 57)) (2.22.0)
Requirement already satisfied: requests-unixsocket==0.2.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 58)) (0.2.0)
Requirement already satisfied: SecretStorage==2.3.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 59)) (2.3.1)
Requirement already satisfied: selenium==3.141.0 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 60)) (3.141.0)
Requirement already satisfied: simplejson==3.16.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 61)) (3.16.0)
Requirement already satisfied: six==1.14.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 62)) (1.14.0)
Requirement already satisfied: sos==4.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 63)) (4.1)
Requirement already satisfied: ssh-import-id==5.10 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 64)) (5.10)
Requirement already satisfied: systemd-python==234 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 65)) (234)
Requirement already satisfied: testresources==2.0.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 66)) (2.0.1)
Requirement already satisfied: thefuck==3.31 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 67)) (3.31)
Requirement already satisfied: tornado==6.1 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 68)) (6.1)
Requirement already satisfied: unattended-upgrades==0.1 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 69)) (0.1)
Requirement already satisfied: urllib3==1.25.8 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 70)) (1.25.8)
Requirement already satisfied: wadllib==1.3.3 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 71)) (1.3.3)
Requirement already satisfied: wcwidth==0.2.5 in /usr/local/lib/python3.8/dist-packages (from -r requirements.txt (line 72)) (0.2.5)
Requirement already satisfied: youtube-dl==2020.3.24 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 73)) (2020.3.24)
Requirement already satisfied: zipp==1.0.0 in /usr/lib/python3/dist-packages (from -r requirements.txt (line 74)) (1.0.0)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from launchpadlib==1.10.13->-r requirements.txt (line 26)) (45.2.0)
root@instance-20210712-1350:/home/ubuntu/YeetMeet# python chromium.py
Traceback (most recent call last):
  File "chromium.py", line 3, in <module>
    from telegram.ext import CommandHandler, Job, run_async
ImportError: No module named telegram.ext

I run it,but it shows this result,can anyone help me

@freak-head
Copy link

you installed requirements using pip3 so use python3 chromium.py

@eyjge
Copy link
Author

eyjge commented Aug 21, 2021

you installed requirements using pip3 so use python3 chromium.py

python3 chromium.py
[0821/192826.246975:WARNING:exception_snapshot_linux.cc(427)] Unhandled signal -1
[0821/192826.353981:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0821/192826.354033:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[387091:387120:0821/192827.243031:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=512
Traceback (most recent call last):
  File "chromium.py", line 9, in <module>
    from bot import updater, dp, browser
  File "/home/ubuntu/YeetMeet/bot/__init__.py", line 25, in <module>
    browser = webdriver.Chrome(options=options)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
    RemoteWebDriver.__init__(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist

ubuntu@instance-20210712-1350:~/YeetMeet$ [0821/193145.246123:WARNING:exception_snapshot_linux.cc(427)] Unhandled signal -1
[0821/193145.346464:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0821/193145.346516:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[387091:387120:0821/193146.356787:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=512
[0821/193215.545788:WARNING:exception_snapshot_linux.cc(427)] Unhandled signal -1
[0821/193215.643871:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0821/193215.643920:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[387091:387120:0821/193216.257418:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=512
[387750:387750:0821/193245.747749:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is swift 
``
Thank you for your help,i can run it now,but i meet this error,what can i do?Thx

@freak-head
Copy link

Add these arguments in bot/init.py

options.add_argument('--remote-debugging-port=9222')
options.add_argument("--user-data-dir=selenium")
options.add_argument("start-maximized")
options.add_argument("--disable-infobars")
options.add_argument("--disable-extensions")
options.add_argument("--disable-gpu")
options.add_argument("--disable-dev-shm-usage")

Don't forget to remove duplicates

@eyjge
Copy link
Author

eyjge commented Aug 22, 2021

Add these arguments in bot/init.py

options.add_argument('--remote-debugging-port=9222')
options.add_argument("--user-data-dir=selenium")
options.add_argument("start-maximized")
options.add_argument("--disable-infobars")
options.add_argument("--disable-extensions")
options.add_argument("--disable-gpu")
options.add_argument("--disable-dev-shm-usage")

Don't forget to remove duplicates

ubuntu@instance-20210712-1350:~$ google-chrome-stable &
[1] 517463
ubuntu@instance-20210712-1350:~$ cd YeetMeet
ubuntu@instance-20210712-1350:~/YeetMeet$ python3 chromium.py
[0822/141507.604169:WARNING:exception_snapshot_linux.cc(427)] Unhandled signal -1
[0822/141508.758525:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0822/141508.758573:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[517463:517494:0822/141516.343662:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=512

^C
^CTraceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
    RemoteWebDriver.__init__(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot create default profile directory


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "chromium.py", line 9, in <module>
    from bot import updater, dp, browser
  File "/home/ubuntu/YeetMeet/bot/__init__.py", line 32, in <module>
    browser = webdriver.Chrome(options=options)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 83, in __init__
    self.quit()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 158, in quit
    self.service.stop()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 151, in stop
    self.send_remote_shutdown_command()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 127, in send_remote_shutdown_command
    url_request.urlopen("%s/shutdown" % self.service_url)
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 521, in open
    meth = getattr(processor, meth_name)
KeyboardInterrupt

Yes,i put them in bot/init.py,but it shows this,what can i do?Thank you.

@freak-head
Copy link

uhhh....im not sure of this can u share your repo link? if u don't mind

@1337w0rm
Copy link
Owner

Add these arguments in bot/init.py
options.add_argument('--remote-debugging-port=9222')
options.add_argument("--user-data-dir=selenium")
options.add_argument("start-maximized")
options.add_argument("--disable-infobars")
options.add_argument("--disable-extensions")
options.add_argument("--disable-gpu")
options.add_argument("--disable-dev-shm-usage")
Don't forget to remove duplicates

ubuntu@instance-20210712-1350:~$ google-chrome-stable &
[1] 517463
ubuntu@instance-20210712-1350:~$ cd YeetMeet
ubuntu@instance-20210712-1350:~/YeetMeet$ python3 chromium.py
[0822/141507.604169:WARNING:exception_snapshot_linux.cc(427)] Unhandled signal -1
[0822/141508.758525:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0822/141508.758573:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[517463:517494:0822/141516.343662:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=512

^C
^CTraceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
    RemoteWebDriver.__init__(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot create default profile directory


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "chromium.py", line 9, in <module>
    from bot import updater, dp, browser
  File "/home/ubuntu/YeetMeet/bot/__init__.py", line 32, in <module>
    browser = webdriver.Chrome(options=options)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 83, in __init__
    self.quit()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 158, in quit
    self.service.stop()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 151, in stop
    self.send_remote_shutdown_command()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 127, in send_remote_shutdown_command
    url_request.urlopen("%s/shutdown" % self.service_url)
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 521, in open
    meth = getattr(processor, meth_name)
KeyboardInterrupt

Yes,i put them in bot/init.py,but it shows this,what can i do?Thank you.

Dont' add options.add_argument("--user-data-dir=selenium")

@eyjge
Copy link
Author

eyjge commented Aug 22, 2021

Add these arguments in bot/init.py
options.add_argument('--remote-debugging-port=9222')
options.add_argument("--user-data-dir=selenium")
options.add_argument("start-maximized")
options.add_argument("--disable-infobars")
options.add_argument("--disable-extensions")
options.add_argument("--disable-gpu")
options.add_argument("--disable-dev-shm-usage")
Don't forget to remove duplicates

ubuntu@instance-20210712-1350:~$ google-chrome-stable &
[1] 517463
ubuntu@instance-20210712-1350:~$ cd YeetMeet
ubuntu@instance-20210712-1350:~/YeetMeet$ python3 chromium.py
[0822/141507.604169:WARNING:exception_snapshot_linux.cc(427)] Unhandled signal -1
[0822/141508.758525:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0822/141508.758573:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[517463:517494:0822/141516.343662:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=512

^C
^CTraceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
    RemoteWebDriver.__init__(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot create default profile directory


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "chromium.py", line 9, in <module>
    from bot import updater, dp, browser
  File "/home/ubuntu/YeetMeet/bot/__init__.py", line 32, in <module>
    browser = webdriver.Chrome(options=options)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 83, in __init__
    self.quit()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 158, in quit
    self.service.stop()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 151, in stop
    self.send_remote_shutdown_command()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 127, in send_remote_shutdown_command
    url_request.urlopen("%s/shutdown" % self.service_url)
  File "/usr/lib/python3.8/urllib/request.py", line 222, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib/python3.8/urllib/request.py", line 521, in open
    meth = getattr(processor, meth_name)
KeyboardInterrupt

Yes,i put them in bot/init.py,but it shows this,what can i do?Thank you.

Dont' add options.add_argument("--user-data-dir=selenium")

ubuntu@instance-20210712-1350:~$ google-chrome-stable &
[1] 529026
ubuntu@instance-20210712-1350:~$ python3 chromium.py
python3: can't open file 'chromium.py': [Errno 2] No such file or directory
ubuntu@instance-20210712-1350:~$ cd YeetMeet
ubuntu@instance-20210712-1350:~/YeetMeet$ python3 chromium.py
[0822/172602.049491:WARNING:exception_snapshot_linux.cc(427)] Unhandled signal -1
[0822/172603.468374:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0822/172603.468506:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[529026:529056:0822/172609.182576:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=512
Traceback (most recent call last):
  File "chromium.py", line 9, in <module>
    from bot import updater, dp, browser
  File "/home/ubuntu/YeetMeet/bot/__init__.py", line 30, in <module>
    browser = webdriver.Chrome(options=options)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", line 76, in __init__
    RemoteWebDriver.__init__(
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: chrome not reachable

ubuntu@instance-20210712-1350:~/YeetMeet$ [0822/172811.953533:WARNING:exception_snapshot_linux.cc(427)] Unhandled signal -1
[0822/172812.147147:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0822/172812.147208:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[529026:529056:0822/172813.252647:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=512
[0822/172842.644919:WARNING:exception_snapshot_linux.cc(427)] Unhandled signal -1
[0822/172842.752561:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0822/172842.752611:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
[529026:529056:0822/172843.665586:ERROR:gpu_process_host.cc(995)] GPU process exited unexpectedly: exit_code=512
^C
ubuntu@instance-20210712-1350:~/YeetMeet$ [529519:529519:0822/172910.858574:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is swiftshader

Yes, I delete options.add_argument("--user-data-dir=selenium") in init.py and it shows this,the chrome icon was shown but there's nothing show inside.What can i do?

@eyjge
Copy link
Author

eyjge commented Aug 29, 2021

uhhh....im not sure of this can u share your repo link? if u don't mind

???

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

3 participants