Page 1 of 1

Check FileSize and SetPriority

Posted: 30 Aug 2020, 10:28
by rolmei
Hallo,
i habe try my first script, but it doesn't work.
Could somebody check what is wrong.

In the message are this messages:
info Sun Aug 30 2020 12:18:46 SizePriority: IndentationError: unindent does not match any outer indentation level
info Sun Aug 30 2020 12:18:46 SizePriority: ^
info Sun Aug 30 2020 12:18:46 SizePriority: result = nzbget.editqueue('GroupSetPriority', 0, Priority, nzb['NZBID']

With the message i find no idea what is really wrong.
Is it possible to debug a phyton in nzbget?

Re: Check FileSize and SetPriority

Posted: 30 Aug 2020, 17:59
by hugbug
Python is sensitive to proper line indentation. Open the file in a text editor which can show invisible symbols (spaces and tabs), then replace all tabs with spaces and check/correct indentation.

Instead of debugging from nzbget you can launch the script from terminal or from your favourite python IDE/debugger. You just need to set environment variables required by your script (which are normally set by nzbget for scripts).