Open desertproject opened 3 days ago
Hey @desertproject! I'm here to help you with any bugs, questions, or contributions you have. I'm a bot designed to assist you while you wait for a human maintainer.
The issue you're encountering is due to seaborn
and pyyaml
being used in the code without being listed as required dependencies in the pyproject.toml
file. Currently, seaborn
is treated as an optional dependency, and the codebase includes mechanisms to handle its absence using conditional imports [1]. However, it seems that in some parts of the code, seaborn
is imported directly, leading to the ModuleNotFoundError
when it's not installed.
To address this, you can consider the following suggestions:
Make seaborn
a required dependency: If seaborn
is essential for the functionality of the project, it should be added to the required dependencies in the pyproject.toml
file. This ensures that it is installed automatically when setting up the project.
Make pyyaml
a required dependency: Similarly, if pyyaml
is necessary for the project to function correctly, it should also be added to the required dependencies.
These changes would prevent the ModuleNotFoundError
by ensuring that both seaborn
and pyyaml
are installed when the project is set up. If you have the ability to modify the pyproject.toml
file, you can add these dependencies there. Otherwise, you might want to discuss this with the maintainers to see if they can update the dependency list accordingly.
To continue talking to Dosu, mention @dosu.
System Info
OS version:
Debian GNU/Linux 12 (bookworm)
Python version:Python 3.11.2
The current version of pandasai being used:2.4.0
🐛 Describe the bug
When instantiating a new Agent, the following error occurs, indicating that seaborn should not be an optional dependency:
After installing seaborn using
poetry add seaborn
, the following error occurs, indicating that pyyaml is also required:To resolve this, I had to run
poetry add pyyaml
, and then everything worked correctly.Suggestion
Make seaborn a required dependency: It appears that seaborn is being imported without being marked as a required dependency, causing errors when it's missing. It should either be made a required dependency or a check should be added to verify if it is present in the environment before importing.
Make pyyaml a required dependency: Similarly, pyyaml should be listed as a required dependency, as it is necessary for proper functionality.