Unable to determine if root directory exists | CLI Issue

Support for Windows users
Post Reply
SDub
Posts: 6
Joined: 15 Sep 2016, 02:27

Unable to determine if root directory exists | CLI Issue

Post by SDub »

This issue has been posted once before on this forum, but the problem magically fixed itself for that other user and so far, magic hasn't been on my side.

I am running this command as a post-script whenever a torrent finishes in qbitorrent which explains several of the args that are being passed:

Code: Select all

filebot -script fn:amc --action hardlink --conflict skip -get-subtitles -non-strict --log-file "Z:\Media" --output "Z:\Media" --def seriesFormat="{kodi}" movieFormat="{kodi}" unsorted=y music=y artwork=y "ut_dir=%F" "ut_kind=multi" "ut_title=%N" "ut_label=%L"
I am getting this output:

Code: Select all

An unexpected error occurred during startup: Z:\: Unable to determine if root directory exists
java.nio.file.FileSystemException: Z:\: Unable to determine if root directory exists
        at net.filebot.util.FileUtilities.createFolders(Unknown Source)
        at net.filebot.util.FileUtilities.createFile(Unknown Source)
        at net.filebot.Logging.createLogFileHandler(Unknown Source)
        at net.filebot.Main.initializeLogging(Unknown Source)
        at net.filebot.Main.main(Unknown Source)
Here is my system's info:

Code: Select all

FileBot 4.9.4 (r8736)
JNA Native: 6.1.0
MediaInfo: 20.09
7-Zip-JBinding: 16.02
Tools: fpcalc/1.5.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2022-01-20 (r791)
Groovy: 3.0.8
JRE: OpenJDK Runtime Environment 16.0.2
JVM: OpenJDK 64-Bit Server VM
CPU/MEM: 12 Core / 4.3 GB Max Memory / 23 MB Used Memory
OS: Windows 10 (amd64)
STORAGE: NTFS [(C:)] @ 5 GB
DATA: C:\Users\Scott\AppData\Roaming\FileBot
Package: MSI
License: FileBot License PX32956161 (Valid-Until: 2072-01-22)
Z:\ is a mounted network drive that points to my NAS. This is likely the root of the issue. I understand that I could run filebot and whatever app leverages filebot on the NAS itself and avoid this issue, but that opens a whole new can of worms that I would love to avoid, if possible. A similar version of this command works nicely when I run it locally on a drive with a couple of files in it.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unable to determine if root directory exists | CLI Issue

Post by rednoah »

There's nothing you can do about Windows SMB file system calls not working:

Code: Select all

java.nio.file.FileSystemException: Z:\: Unable to determine if root directory exists


:!: Note that you're using the same path as both log file and output folder, so that can't work:

Code: Select all

--log-file "Z:\Media" --output "Z:\Media"
:idea: You probably mean to pass --log-file "Z:\Media\amc.log" instead.



:arrow: Note that you'll probably want to copy & paste the example and use it like this:

Code: Select all

--log-file amc.log --output "Z:\Media"
:idea: --log-file amc.log will put the log file into the local app data folder, which is always available and writable. You'll want the log file to be in a location where write operations always work, even if the network is down.



:idea: Using a local log file will workaround the issue above at that point in time since it crashes when trying to create the log file on the remote share on startup, but that of course doesn't resolve the underlying issue, so it'll probably still crash with the same error later on when creating files / folders on the remote share.
:idea: Please read the FAQ and How to Request Help.
SDub
Posts: 6
Joined: 15 Sep 2016, 02:27

Re: Unable to determine if root directory exists | CLI Issue

Post by SDub »

Color me shocked. That one change fixed it! Everything works now. I thought I was going to have to deal with so much more.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Unable to determine if root directory exists | CLI Issue

Post by rednoah »

Well, I guess you accidentally found a strange corner case that causes Windows itself or the remote SMB service to bug out. :lol:
:idea: Please read the FAQ and How to Request Help.
Post Reply