Filebot Doesn't Trigger, No Entry in Log

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
User avatar
alexander_q
Posts: 21
Joined: 19 Aug 2014, 02:02

Filebot Doesn't Trigger, No Entry in Log

Post by alexander_q »

Sysinfo (Windows Store):

Code: Select all

FileBot 4.7.12 (r5171)
JNA Native: 5.1.0
MediaInfo: 0.7.93
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-05-15 (r500)
Groovy: 2.4.10
JRE: Java(TM) SE Runtime Environment 1.8.0_141
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 3 GB Max Memory / 39 MB Used Memory
OS: Windows 10 (amd64)
Package: APPX
Done ?(?????)?
Using qBittorrent v3.3.15 x64 to run script upon download completion:

Code: Select all

filebot.launcher -script fn:amc --output "D:" --log-file D:/amc.log --action move --conflict override -non-strict --def music=n artwork=n clean=y unsorted=y reportError=y "seriesFormat=D:/_TV Shows/{n}/{'Season '+s}/{fn}" "movieFormat=D:/_Movies/{n} ({y})/{fn}" excludeList=amc.txt "%F"
After download, filebot does not operate, and no entry appears in amc.log. Can you help me to solve the problem?
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Doesn't Trigger, No Entry in Log

Post by rednoah »

These links should give you some tips on how to tackle the problem:
viewtopic.php?f=4&t=3067
viewtopic.php?f=4&t=5157


:idea: filebot.launcher.exe does not exist anymore so that might be the obvious issue here.
:idea: Please read the FAQ and How to Request Help.
User avatar
alexander_q
Posts: 21
Joined: 19 Aug 2014, 02:02

Re: Filebot Doesn't Trigger, No Entry in Log

Post by alexander_q »

Thanks rednoah. Are these new requirements as a result of an update (everything was running swimmingly, until it wasn't running at all)?

I'm stuck at the step "Fetch the utorrent-postprocess.pyw python script and modify it to your needs". Is "Fetch" some Python terminology? Could you break it down for me? Also, "modify it to your needs"... Am I able to paste my existing script into the file as is?
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Doesn't Trigger, No Entry in Log

Post by rednoah »

"Fetch" is a synonym for "Download" like when you click "Save As..." in your browser to save a page in your browser as file on your computer.
:idea: Please read the FAQ and How to Request Help.
User avatar
alexander_q
Posts: 21
Joined: 19 Aug 2014, 02:02

Re: Filebot Doesn't Trigger, No Entry in Log

Post by alexander_q »

Thanks, I tend to assume things are more complicated than they are... Here's where I'm at:

The contents of my python script:

Code: Select all

# Run Program: 
# "C:\path\to\utorrent-postprocess.pyw" "%L" "%S" "%N" "%K" "%F" "%D"
#
# Test with Console:
# python "C:\path\to\utorrent-postprocess.pyw" "Movie" "5" "Avatar" "multi" "" "X:\Files\Avatar"


import sys
import subprocess


# configuration
output = 'D:/'


# custom formats (use / instead of \ as directory separator)
movieFormat  = '''{plex}'''
seriesFormat = '''{plex}'''
animeFormat  = '''{plex}'''
musicFormat  = '''{plex}'''


# required args
label, state, title, kind, file, directory = sys.argv[1:7]


command = [
	'filebot', '-script', 'fn:amc',
	'--output', output,
	'--action', 'duplicate',
	'--conflict', 'skip',
	'-non-strict',
	'--log-file', output + 'D:/amc.log',
	'--def',
		'unsorted=y',
		'music=y',
		'artwork=y',
		'movieFormat='  + movieFormat,
		'seriesFormat=' + seriesFormat,
		'animeFormat='  + animeFormat,
		'musicFormat='  + musicFormat,
		'ut_label=' + label,
		'ut_state=' + state,
		'ut_title=' + title,
		'ut_kind='  + kind,
		'ut_file='  + file,
		'ut_dir='   + directory
]


# execute command only for certain conditions (disabled by default)
'''
if state not in ['5', '11']:
	print('Illegal state: %s' % state)
	sys.exit(0)
'''


# execute command (and hide cmd window)
subprocess.run(command, creationflags=0x08000000)
When I run it from command, I get "ValueError: not enough values to unpack". When I run it with parameters '"%L" "" "%N" "multi" "" "%F”" I get no output in console.

In qBittorrent I have:

Code: Select all

"D:\utorrent-postprocess.pyw" "%L" "" "%N" "multi" "" "%F”
When testing a torrent, upon dowload completion nothing happens. No update in log, no errors anywhere. In one of your above links on debugging you mention adding "printenv > "/path/to/log.txt"". In the context of the python script, where would I add such a line?

Thanks.
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Doesn't Trigger, No Entry in Log

Post by rednoah »

1.
Change this line. DO NOT change any other lines unless you know what you're doing.

Code: Select all

# configuration
output = 'X:/Media'

2.
Use copy & paste to copy and paste code VERBATIM from the example, and don't change anything that doesn't need to be changed.

In this case, you have replaced " with ” which is a completely different character. Looks similar, but can't be used interchangeably. Did you use Microsoft Word to write code? DO NOT use Microsoft Word. Please use Notepad++ instead.

YES:

Code: Select all

"%F"
NO:

Code: Select all

"%F”

3.
You can test your script from the command-line like so:

Code: Select all

python "C:\path\to\utorrent-postprocess.pyw" "Movie" "5" "Avatar" "multi" "" "X:\Files\Avatar"
:idea: Please read the FAQ and How to Request Help.
User avatar
alexander_q
Posts: 21
Joined: 19 Aug 2014, 02:02

Re: Filebot Doesn't Trigger, No Entry in Log

Post by alexander_q »

1. I did change this line to "output = 'D:/'", see above.

2. Thanks, fixed

3. What is the expected result of such a test, i.e, how will I know if it has succeeded or failed? When I do it, there is no ouput in the console of any kind.

I have tried again, still nothing happens, no output in amc.log.
User avatar
rednoah
The Source
Posts: 22990
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Doesn't Trigger, No Entry in Log

Post by rednoah »

1.
Are you sure you didn't change anything else? Because you also changed the log location to D:/D:/amc.log which doesn't make sense. ;)

YES

Code: Select all

'--log-file', output + 'amc.log',
YES

Code: Select all

'--log-file', 'D:/amc.log',
NO

Code: Select all

'--log-file', output + 'D:/amc.log',

2.
If you change the last line then you can enable the console.

WITHOUT console:

Code: Select all

subprocess.run(command, creationflags=0x08000000)
WITH console:

Code: Select all

subprocess.run(command)
:idea: Please read the FAQ and How to Request Help.
Post Reply