ericaltendorf / plotman

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

v0.5.2 breaks with config file used in v0.5.1 #925

Open jayhohoho2019 opened 3 years ago

jayhohoho2019 commented 3 years ago

Describe the bug

To Reproduce

Steps to reproduce the behavior, e.g.:

  1. Set up config with '...'
  2. Run other programs '....'
  3. Run Plotman with '....'
  4. See error $ plotman archive Traceback (most recent call last): File "/home/jh/chia-blockchain/venv/bin/plotman", line 8, in sys.exit(main()) File "/home/jh/chia-blockchain/venv/lib/python3.8/site-packages/plotman/plotman.py", line 259, in main disk_space_handler = logging.handlers.RotatingFileHandler( File "/usr/lib/python3.8/logging/handlers.py", line 148, in init BaseRotatingHandler.init(self, filename, mode, encoding, delay) File "/usr/lib/python3.8/logging/handlers.py", line 55, in init logging.FileHandler.init(self, filename, mode, encoding, delay) File "/usr/lib/python3.8/logging/init.py", line 1147, in init StreamHandler.init(self, self._open()) File "/usr/lib/python3.8/logging/init.py", line 1176, in _open return open(self.baseFilename, self.mode, encoding=self.encoding) FileNotFoundError: [Errno 2] No such file or directory: '/home/jh/.cache/plotman/log/plotman-disk_spaces.log' Expected behavior

System setup:

Config

full configuration ```yaml # paste your complete configuration file contents here. # Default/example plotman.yaml configuration file # https://github.com/ericaltendorf/plotman/wiki/Configuration#versions version: [2] logging: # One directory in which to store all plot job logs (the STDOUT/ # STDERR of all plot jobs). In order to monitor progress, plotman # reads these logs on a regular basis, so using a fast drive is # recommended. plots: /home/jh/plotmanlogs/plots transfers: /home/jh/plotmanlogs/transfers application: /home/jh/plotmanlogs/plotman.log

Additional context & screenshots Note I'm only running "plotman archive" with screen. Not using interactive, or for plotting.

altendky commented 3 years ago

(as discussed in keybase, but documenting here)

I thought plotman intended to create those directories if needed, but I need to look back at that. In this case, you want to add a logging: disk_spaces: config entry for the new disk space check logs.

This addressed their immediate issue. The next issue is being addressed in https://github.com/ericaltendorf/plotman/pull/926.

realdevnullius commented 3 years ago

can anyone spell the solution out to me like I'm a 5yo? Appreciated :)

I make a new entry logging: in plotman.yaml? And same for disk_spaces? What values do they get?

altendky commented 3 years ago

When dealing with the config file it is always best to share your full file so we can provide the most direct help. Also, your exact error. If you have specified other logging directories in your config then you would add a disk_spaces: entry as below and make sure the directory you configure exists.

logging:
        # One directory in which to store all plot job logs (the STDOUT/
        # STDERR of all plot jobs).  In order to monitor progress, plotman
        # reads these logs on a regular basis, so using a fast drive is
        # recommended.
        plots: /home/jh/plotmanlogs/plots
        transfers: /home/jh/plotmanlogs/transfers
        application: /home/jh/plotmanlogs/plotman.log
        disk_spaces: /home/jh/plotmanlogs/disk_spaces.log

If you have not specified other logging paths then create the directory (not the file) that was listed in the error.

If this doesn't help, please share your full config and the prompt, command, and output for the error. Then we can provide more explicit instructions for your case.

realdevnullius commented 3 years ago

I had the exact same error, also after updating. Solution for me was adding the following line, including a file: disk_spaces: /home/jh/plotmanlogs/disk_spaces/diskspaces.log

Otherwise plotman will throw an error that a folder was specified instead of a log file.