Closed aysark closed 4 years ago
I also have this issue, but I my first auto-selfcontrol activate
worked fine.
I attempted to reinstall after noticing the block hadn't come on.
I believe it's something to do with the times being fed to SelfControl.
In my case, the script gave the error:
CalledProcessError: Command '['/Applications/SelfControl.app/Contents/MacOS/org.eyebeam.SelfControl', '501', '--install', '/usr/local/etc/auto-selfcontrol/blocklist', '2020.05.23T07:00:00+0100']' returned non-zero exit status 74
So, I attempted to run
sudo /Applications/SelfControl.app/Contents/MacOS/org.eyebeam.SelfControl 501 --install /usr/local/etc/auto-selfcontrol/blocklist 2020.05.23T07:00:00+0100
in the terminal, which gave the error
2020-05-23 21:23:22.194 org.eyebeam.SelfControl[17394:328437] Error: Block end date argument 2020.05.23T07:00:00+0100 is invalid
I then tried 2020-05-23T24:00:00+0100
for the ending date argument, which did work. I'm not sure that the hyphens were necessary.
Since this worked I am unable to test any further, since I just get
2020-05-23 21:35:32.813 org.eyebeam.SelfControl[17463:335370] ERROR: Block is already running
but I suspect that the Python script was attempting to start a block ending at 7am today (in the past) rather than a block ending at 7am tomorrow (2020.05.24T07:00:00+0100
).
@aysark
Could you check if your problem is solved with the current version?
You can simply update through brew upgrade auto-selfcontrol
.
@gcohara Thanks for looking into this issue. I've fixed the block end date to use the hyphens instead of the dots.
@andreasgrill thank you that fixed it!
I'm still seeing a similar issue with the dashes on the latest SelfConrtol and Auto-SelfControl.:
CalledProcessError: Command '['/Applications/SelfControl.app/Contents/MacOS/org.eyebeam.SelfControl', '501', '--install', '/usr/local/etc/auto-selfcontrol/blocklist', '2020-07-22T09:00:00-0700']' returned non-zero exit status 74
@liufrank, I had this issue too, and it seems it's also been mentioned in #50 . My workaround was to split the overnight block in two - e.g for a block from 10pm to 9am, split this into two blocks from 10pm to 11.59pm and 00.01am to 9am.
Thank you for this useful tool. I just upgraded selfcontrol and auto-selfcontrol (using brew) and then i run: auto-selfcontrol activate
I get the following exception and it doesn't run selfcontrol nor apply the blocklist.