Python script works in terminal, but fails in command line sensor

Hi! Thanks for coming back to me, the config of the sensor is:

- platform: command_line
  command: "python3 /config/custom_components/pfSense/pfSense_get_system_stats.py <host> <apikey> <apisecret>"

I followed the instructions in @bthoven’s comment as they were for hassio/HassOS