No module named 'tools' when trying to import a custom tool

So this is generally how you’re supposed to import it into your crew.py:

Example:

from aws_infrastructure_security_audit_and_reporting.tools.aws_infrastructure_scanner_tool import AWSInfrastructureScannerTool

So for you:

  1. Look for the name of the folder under src/ and use that as the first portion of the import before .tools.
  2. Then after .tools. add the file name that’s holding your custom tool function(s); in your case, it looks like it is custom_tool
  3. Finish with the import ImageGeneratorTool

Let me know if this is helpful.