Giter Club home page Giter Club logo

Comments (7)

terry3041 avatar terry3041 commented on July 30, 2024 1

After a few days, I saw the window didn't quit automatically after executing the script. After seeing the main library, I use __del__ function and it seems work

Can you please try the latest version. It should quit the browser automatically now. Thanks.

from pychatgpt.

terry3041 avatar terry3041 commented on July 30, 2024

Well for now its intended because headless environment does not support minimizing the browser window.
So I have to keep compatibility. And its my exam period right now. I dont have the time to maintain this atm.

from pychatgpt.

mancunian1792 avatar mancunian1792 commented on July 30, 2024

You can get the driver object and close it yourself in your use case.

ChatGPT_object_instance.driver.close() should do it.

from pychatgpt.

kimkimkeren avatar kimkimkeren commented on July 30, 2024

Well, somehow here I get error when closing the window

PS D:\openai-twitter-bot> python.exe script.py
Exception ignored in: <function ChatGPT.__del__ at 0x0000026F1896FDC0>
Traceback (most recent call last):
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\pyChatGPT\pyChatGPT.py", line 94, in __del__
  File "C:\Users\Lukmanul Hakim\AppData\Local\Programs\Python\Python38\lib\site-packages\undetected_chromedriver\__init__.py", line 721, in quit
AttributeError: 'NoneType' object has no attribute 'debug'
PS D:\openai-twitter-bot>

I guess it's related to importing error on chromedriver library part

from pychatgpt.

terry3041 avatar terry3041 commented on July 30, 2024

AttributeError: 'NoneType' object has no attribute 'debug'

Did you quit the driver manually (i.e. driver.quit())?
You don't need to do that in newer version.

from pychatgpt.

kimkimkeren avatar kimkimkeren commented on July 30, 2024

Did you quit the driver manually (i.e. driver.quit())? You don't need to do that in newer version.

No I don't, the traceback said the error comes from pychatgpt code

EDIT : it looks like I used the old function, when I use ChatGPT(auth_type, email, password, login_cookies_path) the error dissappears

from pychatgpt.

kimkimkeren avatar kimkimkeren commented on July 30, 2024

After a few days, I saw the window didn't quit automatically after executing the script. After seeing the main library, I use __del__ function and it seems work

from pychatgpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.