You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When attempting to run sploitscan.py with a specific CVE identifier, an ImportError is raised due to the incorrect import statement for the OpenAI library.
Reproduce
Clone the Repository
git clone https://github.com/sploitscan/sploitscan.git
cd sploitscan
Run the script python3 sploitscan/sploitscan.py CVE-2024-49046
Expected Behavior
The script should execute without errors and perform the intended scan based on the provided CVE identifier.
Actual Behavior
An ImportError is raised indicating that the name OpenAI cannot be imported from the openai module.
Error Traceback
Traceback (most recent call last):
File "sploitscan/sploitscan.py", line 16, in <module>
from openai import OpenAI
ImportError: cannot import name 'OpenAI' from 'openai' (/path/to/python/site-packages/openai/__init__.py)
Cause
The error ccurs because the openai library does not have a class or function named OpenAI that can be directly imported. Instead, the correct usage is to import the openai module itself and then access its functionalities.
Solution
Modify the import statement in sploitscan/sploitscan.py
from: from openai import OpenAI
to: import openai
The text was updated successfully, but these errors were encountered:
When attempting to run sploitscan.py with a specific CVE identifier, an ImportError is raised due to the incorrect import statement for the OpenAI library.
Reproduce
Clone the Repository
Install Dependencies
pip install -r requirements.txt
Run the script
python3 sploitscan/sploitscan.py CVE-2024-49046
Expected Behavior
The script should execute without errors and perform the intended scan based on the provided CVE identifier.
Actual Behavior
An ImportError is raised indicating that the name OpenAI cannot be imported from the openai module.
Error Traceback
Cause
The error ccurs because the openai library does not have a class or function named OpenAI that can be directly imported. Instead, the correct usage is to import the openai module itself and then access its functionalities.
Solution
Modify the import statement in sploitscan/sploitscan.py
from:
from openai import OpenAI
to:
import openai
The text was updated successfully, but these errors were encountered: