ChatGPT icon indicating copy to clipboard operation
ChatGPT copied to clipboard

[BUG]TypeError: expected str, bytes or os.PathLike object, not NoneType

Open liutongyang opened this issue 1 year ago • 9 comments

Description I followed the revChatGPT[unofficial] demo for testing in readme,

    from revChatGPT.ChatGPT import Chatbot
    
    chatbot = Chatbot({
      "session_token": "eyJhbGciOiJkaXIiLCJlbmMiOiJBMjU2R0NNIn0..126Ay0S.........."
    }, conversation_id=None, parent_id=None) # You can start a custom conversation
    
    response = chatbot.ask("Prompt", conversation_id=None, parent_id=None) # You can specify custom conversation and parent ids. Otherwise it uses the saved conversation (yes. conversations are automatically saved)
    
    print(response)

but the following error occurred:

    Spawning browser...
    Traceback (most recent call last):
      File "/root/chatgpt/chatgpt_agent.py", line 5, in <module>
        chatbot = Chatbot({
      File "/root/anaconda3/envs/chatgpt/lib/python3.10/site-packages/revChatGPT/ChatGPT.py", line 91, in __init__
        self.get_cf_cookies()
      File "/root/anaconda3/envs/chatgpt/lib/python3.10/site-packages/revChatGPT/ChatGPT.py", line 631, in get_cf_cookies
        driver = uc.Chrome(
      File "/root/anaconda3/envs/chatgpt/lib/python3.10/site-packages/undetected_chromedriver/__init__.py", line 411, in __init__
        browser = subprocess.Popen(
      File "/root/anaconda3/envs/chatgpt/lib/python3.10/subprocess.py", line 971, in __init__
        self._execute_child(args, executable, preexec_fn, close_fds,
      File "/root/anaconda3/envs/chatgpt/lib/python3.10/subprocess.py", line 1722, in _execute_child
        and os.path.dirname(executable)
      File "/root/anaconda3/envs/chatgpt/lib/python3.10/posixpath.py", line 152, in dirname
        p = os.fspath(p)
    TypeError: expected str, bytes or os.PathLike object, not NoneType

Steps to Reproduce

  1. pip3 install revChatGPT[unofficial]
  2. copy session_token to demo
  3. python chatgpt_agent.py

Output In the correct directory, run the following command: python3 -m revChatGPT --debug

          ChatGPT - A command-line interface to OpenAI's ChatGPT (https://chat.openai.com/chat)
          Repo: github.com/acheong08/ChatGPT
      
      Type '!help' to show a full list of commands
      Press enter twice to submit your question.
      
      usage: __main__.py [-h] --api_key API_KEY [--stream] [--temperature TEMPERATURE]
      __main__.py: error: the following arguments are required: --api_key

Environment Please update your packages before reporting the issue: pip3 install --upgrade revChatGPT

  • OS: Linux

  • Python version: Python 3.10.9

  • ChatGPT Version:

     Name: revChatGPT
     Version: 1.1.7
     Summary: ChatGPT is a reverse engineering of OpenAI's ChatGPT API
     Home-page: https://github.com/acheong08/ChatGPT
     Author: Antonio Cheong
     Author-email: [email protected]
     License: GNU General Public License v2.0
     Location: /root/anaconda3/envs/chatgpt/lib/python3.10/site-packages
     Requires: openai, tiktoken
     Required-by:
    

liutongyang avatar Feb 07 '23 11:02 liutongyang