Chia plots check from code

Hello :slight_smile:
I’m trying to do something with chia-blockchain.

I was running the command chia plots check with subshell command from python.

I would like to do it from the package itself now, but there is something that I don’t get.

See this simple example

from chia.util.path import Path
from chia.plotting.check_plots import check_plots
import logging

if __name__ == '__main__':
    log = logging.getLogger(__name__)

    path = Path("/chia")
    log.info('test')
    check_plots(path, 32, None, "", True, False)

I have this output

(check_plot) [chia@centaur-alpha check_plot]$ python3 main.py
Checking for duplicate Plot IDs

which mean that I get the logs from chia-blockchain, but not the test line and the output of the command.
Do you have any clues ?

1 Like