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

[Bug] No such file or directory: 'test_history #76

Closed
0xade1 opened this issue May 14, 2023 · 2 comments
Closed

[Bug] No such file or directory: 'test_history #76

0xade1 opened this issue May 14, 2023 · 2 comments

Comments

@0xade1
Copy link

0xade1 commented May 14, 2023

Describe the bug

saving a current session leads to exception No such file or directory: 'test_history
The directory needs to be created manually prior saving a session

Exception: can only concatenate str (not "tuple") to str
Exception details are below. You may submit an issue on github and paste the error trace
<class 'TypeError'> pentest_gpt.py 615
Before you quit, you may want to save the current session.
Please enter the name of the current session. (Default with current timestamp)
> htb-previse
Traceback (most recent call last):
  File "/Users/adelakloul/github/GreyDGL/PentestGPT/main.py", line 27, in <module>
    pentestGPTHandler.main()
  File "/Users/adelakloul/github/GreyDGL/PentestGPT/utils/pentest_gpt.py", line 645, in main
    self.save_session()
  File "/Users/adelakloul/github/GreyDGL/PentestGPT/utils/pentest_gpt.py", line 538, in save_session
    with open(os.path.join(self.save_dir, save_name), "w") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'test_history/htb-previse'

Expected behavior

the test_directory should be automated created if not exist

Version
N/A

Additional context
N/A

@areslui
Copy link

areslui commented May 15, 2023

when ask to use previous session just type "n"....this will init new session

@GreyDGL
Copy link
Owner

GreyDGL commented May 15, 2023

Should be a problem with no "test_history" folder. Fix in the upcoming minor update.

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