Skip to content

FileNotFoundError for madmax 'chia_plot' #837

@tcwatson

Description

@tcwatson

This is probably user error, but wanted to report this just in case.

When configuring plotman 0.5 to use madmax, it's unable to find the command 'chia_plot'. When I was using madmax by itself, I was referencing it via its fully qualified path, so at first I thought an alias might fix it, but it did not. Eventually I ended up modifying manager.py to fully qualify the path to the chia_plot command, which did finally work.

(venv) tyler@chiaplotter:~/chia-blockchain$ plotman interactive
Traceback (most recent call last):
  File "/home/tyler/chia-blockchain/venv/bin/plotman", line 8, in <module>
    sys.exit(main())
  File "/home/tyler/chia-blockchain/venv/lib/python3.8/site-packages/plotman/plotman.py", line 243, in main
    interactive.run_interactive(
  File "/home/tyler/chia-blockchain/venv/lib/python3.8/site-packages/plotman/interactive.py", line 352, in run_interactive
    curses.wrapper(
  File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/tyler/chia-blockchain/venv/lib/python3.8/site-packages/plotman/interactive.py", line 129, in curses_main
    (started, msg) = manager.maybe_start_new_plot(
  File "/home/tyler/chia-blockchain/venv/lib/python3.8/site-packages/plotman/manager.py", line 227, in maybe_start_new_plot
    p = subprocess.Popen(plot_args,
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
Traceback (most recent call last):
  File "/home/tyler/chia-blockchain/venv/bin/plotman", line 8, in <module>
    sys.exit(main())
  File "/home/tyler/chia-blockchain/venv/lib/python3.8/site-packages/plotman/plotman.py", line 243, in main
    interactive.run_interactive(
  File "/home/tyler/chia-blockchain/venv/lib/python3.8/site-packages/plotman/interactive.py", line 352, in run_interactive
    curses.wrapper(
  File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/tyler/chia-blockchain/venv/lib/python3.8/site-packages/plotman/interactive.py", line 129, in curses_main
    (started, msg) = manager.maybe_start_new_plot(
  File "/home/tyler/chia-blockchain/venv/lib/python3.8/site-packages/plotman/manager.py", line 227, in maybe_start_new_plot
    p = subprocess.Popen(plot_args,
  File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'chia_plot'

Modified line in manager.py that works:

if plotting_cfg.type == "madmax":
                if plotting_cfg.madmax is None:
                    raise Exception(
                        "madmax plotter selected but not configured, report this as a plotman bug",
                    )
-                 plot_args = ['chia_plot',
+                 plot_args = ['/home/tyler/madmax/chia-plotter/build/chia_plot',
                    '-n', str(1),
                    '-r', str(plotting_cfg.madmax.n_threads),
                    '-u', str(plotting_cfg.madmax.n_buckets),
                    '-t', tmpdir if tmpdir.endswith('/') else (tmpdir + '/'),
                    '-d', dstdir if dstdir.endswith('/') else (dstdir + '/') ]
                if dir_cfg.tmp2 is not None:
                    plot_args.append('-2')
                    plot_args.append(dir_cfg.tmp2 if dir_cfg.tmp2.endswith('/') else (dir_cfg.tmp2 + '/'))

Not sure if this is relevant, but I updated both plotman and madmax to their latest versions today after being about 2 months out of date on both.

Is there some other method of telling linux (other than an alias) or even python that chia_plot should refer to a specific path? Am I missing something with setting up madmax? Or should plotman be configurable to set a custom path to chia_plot?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions