ericaltendorf / plotman

Chia plotting manager
Apache License 2.0
911 stars 280 forks source link

interactive mode not working #298

Open grobalt opened 3 years ago

grobalt commented 3 years ago

Plotmanager itself is running, startet 16 jobs and i can see them with status But with interactive this happens:

(venv) patrick@epyc:~/chia-blockchain$ plotman interactive
Traceback (most recent call last):
  File "/home/patrick/chia-blockchain/venv/bin/plotman", line 8, in <module>
    sys.exit(main())
  File "/home/patrick/chia-blockchain/venv/lib/python3.8/site-packages/plotman/plotman.py", line 171, in main
    interactive.run_interactive()
  File "/home/patrick/chia-blockchain/venv/lib/python3.8/site-packages/plotman/interactive.py", line 353, in run_interactive
    curses.wrapper(curses_main)
  File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/patrick/chia-blockchain/venv/lib/python3.8/site-packages/plotman/interactive.py", line 267, in curses_main
    header_win.addnstr(' (remote)', linecap)
_curses.error: addnwstr() returned ERR
(venv) patrick@epyc:~/chia-blockchain$ 
spirifoxy commented 3 years ago

Same here on the development branch, a bit different traceback, but the picture is the same - plotting works, status command works, but plotman interactive throws this:

# plotman interactive
Traceback (most recent call last):
  File "/root/chia-blockchain/venv/bin/plotman", line 8, in <module>
    sys.exit(main())
  File "/root/chia-blockchain/venv/lib/python3.8/site-packages/plotman/plotman.py", line 173, in main
    interactive.run_interactive()
  File "/root/chia-blockchain/venv/lib/python3.8/site-packages/plotman/interactive.py", line 334, in run_interactive
    curses.wrapper(curses_main)
  File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
    return func(stdscr, *args, **kwds)
  File "/root/chia-blockchain/venv/lib/python3.8/site-packages/plotman/interactive.py", line 180, in curses_main
    dst_report = reporting.dst_dir_report(
  File "/root/chia-blockchain/venv/lib/python3.8/site-packages/plotman/reporting.py", line 165, in dst_dir_report
    priority = archive.compute_priority(eldest_ph, gb_free, n_plots)
  File "/root/chia-blockchain/venv/lib/python3.8/site-packages/plotman/archive.py", line 65, in compute_priority
    if (phase.known):
AttributeError: 'tuple' object has no attribute 'known'
thomann061 commented 3 years ago

This happens when the window is not large enough to display plotman interactive. Expand the window.

emersonnevesjr commented 3 years ago

This happens when the window is not large enough to display plotman interactive. Expand the window.

was having this same problem and you are right, just expand the window and it works.

agustinmono commented 3 years ago

i have it on full screen but i have the same problem , any idea?

jameswood commented 3 years ago

I have the same problem, even with a large window (stty -a reports rows 86; columns 237)

Setting use_stty_size: False does not help.

I am on the development branch on Ubuntu server 20.04.2. Works fine on another machine running Ubuntu desktop. (?)

jameswood commented 3 years ago

If I add a second temporary directory this error goes away and everything is fine. With only one temp dir, crashtown. ¯_(ツ)_/¯

EDIT: I mean two "tmp:" directories, not a "tmp2:" directory.

EDIT 2: As @Monstarules points out below, it appears that this wasn't a fix, something else I changed must have sorted it out because today Plotman works with a single temp dir. I've also had this error when there was a problem with Chia itself - it couldn't start a plot because the output directory selected in Plotman wasn't also listed in the Chia config file. This caused Chia to fail, which caused plotman interactive to fail as soon as it tried to start a plot (on startup). It seems that this error can be triggered many ways!

Monstarules commented 3 years ago

The following fixes do not work everywhere:

This is an actual bug, the proper solution lies within fixing the plotman code itself.

mcybz commented 3 years ago

@Monstarules I wonder if the terminal program and OS you using maes a difference. Everyone getting errors are you using Putty on Windows?

jameswood commented 3 years ago

@Monstarules I wonder if the terminal program and OS you using maes a difference. Everyone getting errors are you using Putty on Windows?

I'm using Terminal on a Mac.

I think it's important to note than when the Terminal window is too small, I get a different (and very useful!) error:

Traceback (most recent call last):
  File "/home/james/chia-blockchain/venv/lib/python3.8/site-packages/plotman/interactive.py", line 334, in run_interactive
    curses.wrapper(curses_main)
  File "/usr/lib/python3.8/curses/__init__.py", line 105, in wrapper
    return func(stdscr, *args, **kwds)
  File "/home/james/chia-blockchain/venv/lib/python3.8/site-packages/plotman/interactive.py", line 255, in curses_main
    header_win.addnstr('  archive=', linecap, curses.A_BOLD)
_curses.error: addnwstr() returned ERR

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/home/james/chia-blockchain/venv/bin/plotman", line 8, in <module>
    sys.exit(main())
  File "/home/james/chia-blockchain/venv/lib/python3.8/site-packages/plotman/plotman.py", line 173, in main
    interactive.run_interactive()
  File "/home/james/chia-blockchain/venv/lib/python3.8/site-packages/plotman/interactive.py", line 336, in run_interactive
    raise TerminalTooSmallError(
plotman.interactive.TerminalTooSmallError: Your terminal may be too small, try making it bigger.

When the terminal really is too small, the error is: Your terminal may be too small, try making it bigger, not 'tuple' object has no attribute 'known'

altendky commented 3 years ago

@spirifoxy, sounds like an unrelated issue. If it is still present on the development branch now then please file another issue.

Other than here, I have not heard of curses errors that were not resolved by increasing the terminal size. Of course, that doesn't mean they don't exist. I'm working on switching away from curses to something a bit more pleasant that will hopefully make this all a bit more graceful.

For the replies saying they are having the same problem regardless of terminal size, which problem? There were two unrelated tracebacks. If you aren't having the first traceback then please file a separate ticket or get help in the plotman channel on keybase. Do try with latest development so you have all the recent (including this evening) fixes.

jameswood commented 3 years ago

For the replies saying they are having the same problem regardless of terminal size, which problem?

Oh no — I was having the second, unrelated problem. Sorry about that! Posting while tired I'm afraid. Excited to try the latest build right now!

agustinmono commented 3 years ago

@spirifoxy, sounds like an unrelated issue. If it is still present on the development branch now then please file another issue.

Other than here, I have not heard of curses errors that were not resolved by increasing the terminal size. Of course, that doesn't mean they don't exist. I'm working on switching away from curses to something a bit more pleasant that will hopefully make this all a bit more graceful.

For the replies saying they are having the same problem regardless of terminal size, which problem? There were two unrelated tracebacks. If you aren't having the first traceback then please file a separate ticket or get help in the plotman channel on keybase. Do try with latest development so you have all the recent (including this evening) fixes.

Im still having this problem, i really dont know how to solve it // plotman 0.2 // plotman is plotting fine, but cant use interactive mode

image

altendky commented 3 years ago

@jameswood it happens, there's a lot to keep track of. :]

@agustinmono that is not this problem. Note how the exception you get is unrelated to the exception reported in the original post for this issue. Try using the development branch and see if it is fixed or wait for me to get v0.3 released and install that.

All, I'm going to hide the tuple traceback post in hopes we can keep this issue on the original topic.

cujo0072 commented 3 years ago

I changed my term font size from 16 down to 12. That allowed it to run.