Filebot Stopped Working

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 Stopped Working

Post by alexander_q »

I recently installed python 2.x (for the sake of PlexPy) on top of python 3.x, so it's possible that's causing some sort of problem, though cmd still reports 3.6.3.

Command:

Code: Select all

"Q:/utorrent-postprocess.pyw" "%L" "" "%N" "multi" "" "%F"
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 = 'Q:/'


# custom formats (use / instead of \ as directory separator)
movieFormat  = "Q:/_Movies/{n} ({y})/{fn}"
seriesFormat = "Q:/_TV Shows/{n}/{'Season '+s}/{fn}"
animeFormat  = '''{plex}'''
musicFormat  = '''{plex}'''


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


command = [
	'filebot', '-script', 'fn:amc',
	'--output', output,
	'--action', 'hardlink',
	'--conflict', 'override',
	'-non-strict',
	'--log-file', output + 'amc.log',
	'--def',
		'unsorted=y',
		'music=n',
		'artwork=n',
		'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)
Python:

Code: Select all

Python 3.6.3 (v3.6.3:2c5fed8, Oct  3 2017, 17:26:49) [MSC v.1900 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Filebot:

Code: Select all

FileBot 4.7.14 (r5234)
JNA Native: 5.2.0
MediaInfo: 0.7.99
7-Zip-JBinding: 9.20
Chromaprint: 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-11-21 (r512)
Groovy: 2.4.12
JRE: Java(TM) SE Runtime Environment 1.8.0_151
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 8 Core / 3 GB Max Memory / 34 MB Used Memory
OS: Windows 10 (amd64)
Package: APPX
Done ?(?????)?
Filebot worked as expected until today. Now, the files are not copied. There are no entries of any kind in amc.log. There is no indication the script has been run. In previous install of windows, had PlexPy and filebot amc both working, though I don't remember the python setup.
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Stopped Working

Post by rednoah »

The sysinfo output shows that FileBot works. The next step would be to check if utorrent-postprocess.pyw works or not.

utorrent-postprocess.pyw does require the latest version of Python, so if this script is executed with Python 2.* then it will fail.

If you just call the pyw script, then it depends what python is associated pyw, so it's best to call it with a specific python executable so you know exactly what python executable is executing the utorrent-postprocess script:

Code: Select all

"C:\path\to\python3.exe" "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 Stopped Working

Post by alexander_q »

Could I do, for example:

Code: Select all

"C:\path\to\python3.exe" "C:\path\to\utorrent-postprocess.pyw" "%L" "" "%N" "multi" "" "%F"
Directly from the torrent program?

EDIT: Nope, apparently that doesn't work either. Still no entry in amc.log. I pointed to "pythonw.exe" not "python.exe", what's the difference?
User avatar
rednoah
The Source
Posts: 22986
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot Stopped Working

Post by rednoah »

Yes, that'll work. But there may be other unrelated issues. Best to use CMD to make a few calls for testing and so that you can see the console output.

pythonw.exe is the GUI executable, which means you won't get a CMD window, and you won't get console output if something is not working, so for debugging you want to use python.exe so you can see what you're doing.
:idea: Please read the FAQ and How to Request Help.
Post Reply