Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix memo plotid #17856

Merged
merged 7 commits into from Apr 30, 2024
15 changes: 13 additions & 2 deletions chia/plotting/create_plots.py
Expand Up @@ -210,11 +210,22 @@ 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:
print(f"Type of args.memo: {type(args.memo)}") # Should print: <class 'str'>
emlowe marked this conversation as resolved.
Show resolved Hide resolved
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")

Expand Down