Chronial / snapraid-runner

Python script for SnapRAID cronjobs
MIT License
302 stars 96 forks source link

Snapraid-runner error after updating conf file #53

Closed RBeatse closed 2 years ago

RBeatse commented 2 years ago

have been using Snapraid (using the Snapraid-Runner scripts) for a few months and everything works fine. My wife has been moving lots of files around and today I noticed that it is not deleting because the script has a delete threshold of 80. I updated the snapriad-runner.conf file to deletethreshold = 6000 and it died when i tried to run it. This is the message I get

2022-03-10 15:18:01,140 [INFO ] ============================================================

2022-03-10 15:18:01,141 [INFO ] Run started

2022-03-10 15:18:01,141 [INFO ] ============================================================

2022-03-10 15:18:01,142 [INFO ] Running diff...

2022-03-10 15:18:01,161 [OUTERR] Invalid command '{\rtf1\ansi\deff0\nouicompat{\fonttbl{\f0\fnil\fcharset0' in 'C:/Snapraid/snapraid.conf' at line 1

2022-03-10 15:18:01,462 [ERROR ] Run failed due to unexpected exception:

Traceback (most recent call last:)

File "c:\Snapraid\snapraid-runner-0.5-daily\snapraid-runner.py", line 233, in main

run()

File "c:\Snapraid\snapraid-runner-0.5-daily\snapraid-runner.py", line 260, in run

diff_out = snapraid_command("diff", allow_statuscodes=[2])

File "c:\Snapraid\snapraid-runner-0.5-daily\snapraid-runner.py", line 72, in snapraid_command

raise subprocess.CalledProcessError(ret, "snapraid " + command)

subprocess.CalledProcessError: Command 'snapraid diff' returned non-zero exit status 1.

I have tried changing the threshold to -1 which should turn it off completely but I get the same message. I am pretty sure I am saving the file wrong but not sure what I am doing (I can tell in notepad that it is saving as UTF-8), if that matters.

Chronial commented 2 years ago

It looks like you edited the file in Wordpad? What editor are you using exactly?

RBeatse commented 2 years ago

The first time it didn’t work was after I used Wordpad. I then went into the example Conf file and used Notepad and still had the issue. Maybe the hidden codes were there but since they are hidden I don't know how to get rid of them.

RBeatse commented 2 years ago

This has been fixed. I downloaded and got new conf example files and updated them. The opening of the file in Wordpad corrupted them (obviously) and that was causing the issue.