diff --git a/chia/plotting/create_plots.py b/chia/plotting/create_plots.py index ac33b5723153..c6321d792cb5 100644 --- a/chia/plotting/create_plots.py +++ b/chia/plotting/create_plots.py @@ -202,7 +202,7 @@ async def create_plots( # The plot id is based on the harvester, farmer, and pool keys if keys.pool_public_key is not None: plot_id: bytes32 = calculate_plot_id_pk(keys.pool_public_key, plot_public_key) - plot_memo: bytes32 = stream_plot_info_pk(keys.pool_public_key, keys.farmer_public_key, sk) + plot_memo: bytes = stream_plot_info_pk(keys.pool_public_key, keys.farmer_public_key, sk) else: assert keys.pool_contract_puzzle_hash is not None plot_id = calculate_plot_id_ph(keys.pool_contract_puzzle_hash, plot_public_key) @@ -210,11 +210,21 @@ async def create_plots( if args.plotid is not None: log.info(f"Debug plot ID: {args.plotid}") - plot_id = bytes32(bytes.fromhex(args.plotid)) + # Check if args.memo is of type bytes and convert it to a string if so + if isinstance(args.plotid, bytes): + plot_str = args.plotid.hex() # Convert bytes to hex string + else: + plot_str = args.plotid + plot_id = bytes32.fromhex(plot_str) if args.memo is not None: log.info(f"Debug memo: {args.memo}") - plot_memo = bytes32.fromhex(args.memo) + # Check if args.memo is of type bytes and convert it to a string if so + if isinstance(args.memo, bytes): + memo_str = args.memo.hex() # Convert bytes to hex string + else: + memo_str = args.memo + plot_memo = bytes.fromhex(memo_str) dt_string = datetime.now().strftime("%Y-%m-%d-%H-%M")