GreyDGL / PentestGPT

A GPT-empowered penetration testing tool
MIT License
7.28k stars 883 forks source link

ModuleNotFoundError: No module named 'utils.chatgpt' #107

Closed azyzzafar closed 1 year ago

azyzzafar commented 1 year ago

┌──(cybergeek㉿CyberGeek)-[~/PentestGPT] └─$ python3 test_connection.py Traceback (most recent call last): File "/home/cybergeek/PentestGPT/test_connection.py", line 4, in from utils.chatgpt import ChatGPT ModuleNotFoundError: No module named 'utils.chatgpt'

I'm using Kali linux btw.

Af7eR9l0W commented 1 year ago

There is a new directory called pentestgpt that was added in the latest release. Run the scripts inside that directory or install and use the repo via pip3 install git+https://github.com/GreyDGL/PentestGPT

azyzzafar commented 1 year ago

Let me try and I will let you know how it went.

azyzzafar commented 1 year ago

Traceback (most recent call last): File "/usr/local/bin/pentestgpt", line 33, in sys.exit(load_entry_point('pentestgpt==0.8.0', 'console_scripts', 'pentestgpt')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cybergeek/.local/lib/python3.11/site-packages/pentestgpt/main.py", line 29, in main pentestGPTHandler.main() File "/home/cybergeek/.local/lib/python3.11/site-packages/pentestgpt/utils/pentest_gpt.py", line 643, in main self.initialize(previous_session_ids=loaded_ids) File "/home/cybergeek/.local/lib/python3.11/site-packages/pentestgpt/utils/pentest_gpt.py", line 221, in initialize self._feed_init_prompts() File "/home/cybergeek/.local/lib/python3.11/site-packages/pentestgpt/utils/pentest_gpt.py", line 147, in _feed_init_prompts self.prompts.first_todo + _response


TypeError: can only concatenate str (not "tuple") to str

i did as you instructed me and im receiving this error, not sure whats happening.
Af7eR9l0W commented 1 year ago

I usually get that error when trying to run the main script with a wrong/old cookie. Have you tested your connection first?

GreyDGL commented 1 year ago

@azyzzafar May I know the command you're executing?

azyzzafar commented 1 year ago

pentestgpt and this error is after it ask me to give a command for task

GreyDGL commented 1 year ago

I see. It should be a bug where you can only use todo command after the first subtask has been completed. This means that after the first task is given, you should always use next command.