obaskly / Midjourney-Telegram-Wrapper

Midjourney integration with Telegram Bot
17 stars 6 forks source link

Bro I need help, pls... #2

Open Juranik opened 1 year ago

Juranik commented 1 year ago

whats wrong?

C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py Traceback (most recent call last): File "C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py", line 659, in driver = create_chrome_driver(user_data_dir) File "C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py", line 106, in create_chrome_driver driver = webdriver.Chrome(options=options) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in init super().init( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 56, in init super().init( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 206, in init self.start_session(capabilities) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 290, in start_session response = self.execute(Command.NEW_SESSION, caps)["value"] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 345, in execute self.error_handler.check_response(response) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist Stacktrace: GetHandleVerifier [0x00007FF73B7B52A2+57122] (No symbol) [0x00007FF73B72EA92] (No symbol) [0x00007FF73B5FE3AB] (No symbol) [0x00007FF73B629878] (No symbol) [0x00007FF73B625005] (No symbol) [0x00007FF73B622FE1] (No symbol) [0x00007FF73B65EA4F] (No symbol) [0x00007FF73B65E5B0] (No symbol) [0x00007FF73B656DB3] (No symbol) [0x00007FF73B62D2B1] (No symbol) [0x00007FF73B62E494] GetHandleVerifier [0x00007FF73BA5EF82+2849794] GetHandleVerifier [0x00007FF73BAB1D24+3189156] GetHandleVerifier [0x00007FF73BAAACAF+3160367] GetHandleVerifier [0x00007FF73B846D06+653702] (No symbol) [0x00007FF73B73A208] (No symbol) [0x00007FF73B7362C4] (No symbol) [0x00007FF73B7363F6] (No symbol) [0x00007FF73B7267A3] BaseThreadInitThunk [0x00007FF9C54C7604+20] RtlUserThreadStart [0x00007FF9C6B626A1+33]

Process finished with exit code 1

When running this code, for some reason, the chrome browser opens, and when I wrote to the bot / start, this error appears after some time

and there was also an error, but I fixed it, just created a file in the folder 'user_times.json'

EDITED: THIS ERROR APPEAR ANYWAY FOR SOME TIME BROWSER CLOSING, and appears this error

C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py Traceback (most recent call last): File "C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py", line 659, in driver = create_chrome_driver(user_data_dir) File "C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py", line 106, in create_chrome_driver driver = webdriver.Chrome(options=options) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in init super().init( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 56, in init super().init( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 206, in init self.start_session(capabilities) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 290, in start_session response = self.execute(Command.NEW_SESSION, caps)["value"] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 345, in execute self.error_handler.check_response(response) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist Stacktrace: GetHandleVerifier [0x00007FF73B7B52A2+57122] (No symbol) [0x00007FF73B72EA92] (No symbol) [0x00007FF73B5FE3AB] (No symbol) [0x00007FF73B629878] (No symbol) [0x00007FF73B625005] (No symbol) [0x00007FF73B622FE1] (No symbol) [0x00007FF73B65EA4F] (No symbol) [0x00007FF73B65E5B0] (No symbol) [0x00007FF73B656DB3] (No symbol) [0x00007FF73B62D2B1] (No symbol) [0x00007FF73B62E494] GetHandleVerifier [0x00007FF73BA5EF82+2849794] GetHandleVerifier [0x00007FF73BAB1D24+3189156] GetHandleVerifier [0x00007FF73BAAACAF+3160367] GetHandleVerifier [0x00007FF73B846D06+653702] (No symbol) [0x00007FF73B73A208] (No symbol) [0x00007FF73B7362C4] (No symbol) [0x00007FF73B7363F6] (No symbol) [0x00007FF73B7267A3] BaseThreadInitThunk [0x00007FF9C54C7604+20] RtlUserThreadStart [0x00007FF9C6B626A1+33]

anyway if I wouldnt write /start command

obaskly commented 1 year ago

Make sure the version of selenium you are using is compatible with the python version you have. Also, make sure the chromedriver.exe is within the same directory as the script, and check the version of your Google chrome browser before downloading the chromedriver.

Juranik commented 1 year ago

My python version 3.10, I dont know which version I should use

Juranik commented 1 year ago

I downloading selenimum selenium 4.12.0

Juranik commented 1 year ago

Hello, bro again, I made it all, installed all libraries to latest version, and install chromedriver latest from GITHUB and out it folder where midj, and start it, and got this on console, its normal?

C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py The chromedriver version (103.0.5060.114) detected in PATH at C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\chromedriver.exe might not be compatible with the detected chrome version (116.0.5845.141); currently, chromedriver 116.0.5845.96 is recommended for chrome 116.*, so it is advised to delete the driver in PATH and retry

I got error that I need install crhome another version, well I'wll do it. what mean PATH btw? My OS btw win10

EDITED: Done, I downlaoded Chomedriver through pip install, becuz I didnt find version of exe... now starting it

Juranik commented 1 year ago

Well, in the end I got this error...):

C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py Traceback (most recent call last): File "C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py", line 659, in driver = create_chrome_driver(user_data_dir) File "C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py", line 106, in create_chrome_driver driver = webdriver.Chrome(options=options) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in init super().init( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 56, in init super().init( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 205, in init self.start_session(capabilities) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 289, in start_session response = self.execute(Command.NEW_SESSION, caps)["value"] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 344, in execute self.error_handler.check_response(response) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist Stacktrace: GetHandleVerifier [0x00007FF707B452A2+57122] (No symbol) [0x00007FF707ABEA92] (No symbol) [0x00007FF70798E3AB] (No symbol) [0x00007FF7079B9878] (No symbol) [0x00007FF7079B5005] (No symbol) [0x00007FF7079B2FE1] (No symbol) [0x00007FF7079EEA4F] (No symbol) [0x00007FF7079EE5B0] (No symbol) [0x00007FF7079E6DB3] (No symbol) [0x00007FF7079BD2B1] (No symbol) [0x00007FF7079BE494] GetHandleVerifier [0x00007FF707DEEF82+2849794] GetHandleVerifier [0x00007FF707E41D24+3189156] GetHandleVerifier [0x00007FF707E3ACAF+3160367] GetHandleVerifier [0x00007FF707BD6D06+653702] (No symbol) [0x00007FF707ACA208] (No symbol) [0x00007FF707AC62C4] (No symbol) [0x00007FF707AC63F6] (No symbol) [0x00007FF707AB67A3] BaseThreadInitThunk [0x00007FFF4C1E7604+20] RtlUserThreadStart [0x00007FFF4CDC26A1+33]

Process finished with exit code 1

And for some reason opened this code:

Licensed to the Software Freedom Conservancy (SFC) under one

or more contributor license agreements. See the NOTICE file

distributed with this work for additional information

regarding copyright ownership. The SFC licenses this file

to you under the Apache License, Version 2.0 (the

"License"); you may not use this file except in compliance

with the License. You may obtain a copy of the License at

#

http://www.apache.org/licenses/LICENSE-2.0

#

Unless required by applicable law or agreed to in writing,

software distributed under the License is distributed on an

"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

KIND, either express or implied. See the License for the

specific language governing permissions and limitations

under the License.

from selenium.webdriver.chromium.webdriver import ChromiumDriver from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

from .options import Options from .service import Service

class WebDriver(ChromiumDriver): """Controls the ChromeDriver and allows you to drive the browser."""

def __init__(
    self,
    options: Options = None,
    service: Service = None,
    keep_alive: bool = True,
) -> None:
    """Creates a new instance of the chrome driver. Starts the service and
    then creates new instance of chrome driver.

    :Args:
     - options - this takes an instance of ChromeOptions
     - service - Service object for handling the browser driver if you need to pass extra details
     - keep_alive - Whether to configure ChromeRemoteConnection to use HTTP keep-alive.
    """
    service = service if service else Service()
    options = options if options else Options()

    super().__init__(
        DesiredCapabilities.CHROME["browserName"],
        "goog",
        options,
        service,
        keep_alive,
    )
Juranik commented 1 year ago

Bro I Installed old version chrome that have same version almost like a CHROMEDRIVER, I WIll try now again

again......

C:\Users\Administrator\AppData\Local\Programs\Python\Python310\python.exe C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py Traceback (most recent call last): File "C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py", line 660, in driver = create_chrome_driver(user_data_dir) File "C:\Users\Administrator\Desktop\Midjourney-Telegram-Wrapper-main\main.py", line 106, in create_chrome_driver driver = webdriver.Chrome(options=options) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 45, in init super().init( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 56, in init super().init( File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 205, in init self.start_session(capabilities) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 289, in start_session response = self.execute(Command.NEW_SESSION, caps)["value"] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 344, in execute self.error_handler.check_response(response) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 229, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist Stacktrace: Backtrace: GetHandleVerifier [0x010AA813+48355] (No symbol) [0x0103C4B1] (No symbol) [0x00F45358] (No symbol) [0x00F65714] (No symbol) [0x00F61DA1] (No symbol) [0x00F60579] (No symbol) [0x00F90C55] (No symbol) [0x00F9093C] (No symbol) [0x00F8A536] (No symbol) [0x00F682DC] (No symbol) [0x00F693DD] GetHandleVerifier [0x0130AABD+2539405] GetHandleVerifier [0x0134A78F+2800735] GetHandleVerifier [0x0134456C+2775612] GetHandleVerifier [0x011351E0+616112] (No symbol) [0x01045F8C] (No symbol) [0x01042328] (No symbol) [0x0104240B] (No symbol) [0x01034FF7] BaseThreadInitThunk [0x76510099+25] RtlGetAppContainerNamedObjectPath [0x77AF7B6E+286] RtlGetAppContainerNamedObjectPath [0x77AF7B3E+238]

Process finished with exit code 1

Version of chrome: 114.0.5735.134 ChromeDriver.exe: 114.0.5735.90

I dont know what to do next.... pls help me bro,.....