"Invalid file path" error on Raspberry Pi 4

Any questions? Need some help?
Post Reply
jp4500
Posts: 31
Joined: 23 Aug 2015, 01:55

"Invalid file path" error on Raspberry Pi 4

Post by jp4500 » 05 Dec 2019, 23:22

Hi,

I've seen this happen a couple of times now and can't figure out what's wrong.

Code: Select all

Invalid file path: /media/MEDIA/INCOMING/TEST.MOVIE.2019.1080p.WEBRip.DD5.1.x264-CM/TEST.MOVIE.2019.1080p.WEBRip.DD5.1.x264-CM.mkv
(obviously, that's not the exact file name)

When it initially happened I assumed there was some invalid character in the file or path name.. so, I first renamed the file to something really simple but that gave the same result. Then, I moved it out of the long folder as well so it was just "TEST MOVIE (2019).mkv". That still didn't work (same error)

I checked that the file permissions looked good. Lastly, I updated to the latest beta version of filebot (the portable version).

I can provide more info.. I think there's a "status" command that produces some info about the env so I'll get that. But, I'd like to try and understand what could cause that error

jp4500
Posts: 31
Joined: 23 Aug 2015, 01:55

Re: "Invalid file path" error on Raspberry Pi 4

Post by jp4500 » 05 Dec 2019, 23:24

Here's the sysinfo output:

Code: Select all

pi@raspberrypi:~ $ filebot.sh -script fn:sysinfo
FileBot 4.9.0 (r6912)
JNA Native: 6.1.0
MediaInfo: 19.04
p7zip: p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,32 bits,4 CPUs LE)
unrar: UNRAR 5.61 beta 1 freeware
FFprobe: 4.1.4-1+rpt1~deb10u1
Chromaprint: 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-12-03 (r607)
Groovy: 2.5.8
JRE: LibericaJDK Runtime Environment 12.0.1-BellSoft
JVM: 32-bit LibericaJDK Client VM
CPU/MEM: 4 Core / 519 MB Max Memory / 23 MB Used Memory
OS: Linux (arm)
HW: Linux raspberrypi 4.19.83-v7l+ #1277 SMP Mon Nov 11 16:41:20 GMT 2019 armv7l GNU/Linux
STORAGE: ext4 [/] @ 25 GB | vfat [/boot] @ 208 MB | autofs [/media/MEDIA] @ 2.2 TB
DATA: /home/pi/filebot/data/pi
Package: TAR
Activate License [******] on [Thu Dec 05 18:23:00 EST 2019]
License: FileBot License ****** (Valid-Until: 2020-06-07)
Done ヾ(@⌒ー⌒@)ノ

jp4500
Posts: 31
Joined: 23 Aug 2015, 01:55

Re: "Invalid file path" error on Raspberry Pi 4

Post by jp4500 » 05 Dec 2019, 23:40

And here's the full command I'm running FWIW:

Code: Select all

    /home/pi/filebot/filebot.sh -script fn:amc --output $MEDIA --log all --log-file /tmp/filebot.log \
        --filter "!readLines('/usr/local/bin/excludes.txt').contains(n)" \
        --action move --conflict auto -non-strict "$FILE_PATH" --def artwork=y \
        seriesFormat="$MEDIA/TV/{ny}/Season {s}\{n} - S{s.pad(2)}E{e.pad(2)} - {t}" \
        movieFormat="$MEDIA/DVD/{n} ({y})/{n} ({y})"

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

Re: "Invalid file path" error on Raspberry Pi 4

Post by rednoah » 06 Dec 2019, 05:34

Invalid file path means that the file path does not exist:

Code: Select all

Invalid file path
:idea: That's either because the file path is incorrect, and indeed does not exist, or appears to not exist due to permissions, sandboxing, etc.
:idea: Please read the FAQ and How to Request Help.

jp4500
Posts: 31
Joined: 23 Aug 2015, 01:55

Re: "Invalid file path" error on Raspberry Pi 4

Post by jp4500 » 06 Dec 2019, 15:47

The file definitely is there though.. in fact filebot finds it on it's own and logs the exact filename. How is that possible?

Code: Select all

Invalid file path: /media/MEDIA/INCOMING/TEST.MOVIE.2019.1080p.WEBRip.DD5.1.x264-CM/TEST.MOVIE.2019.1080p.WEBRip.DD5.1.x264-CM.mkv
Could there be some other reason for this error?

Code: Select all

ls -al
-rwxr-xr-x 1 pi pi 6434301987 Dec  3 11:50
I should add that this doesn't happen for every file either.. I've only seen it happen a couple of times now. I'm just trying to narrow down the issue to figure out why it's happening and what I can change to fix it

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

Re: "Invalid file path" error on Raspberry Pi 4

Post by rednoah » 06 Dec 2019, 17:26

jp4500 wrote:
06 Dec 2019, 15:47
The file definitely is there though.. in fact filebot finds it on it's own and logs the exact filename. How is that possible?
What is the exact command-line call? What does the complete console log say?

jp4500 wrote:
06 Dec 2019, 15:47
I should add that this doesn't happen for every file either.. I've only seen it happen a couple of times now. I'm just trying to narrow down the issue to figure out why it's happening and what I can change to fix it
Are we talking a local file system, or a remote file system? If it's a remote file system, then the remote file system can do whatever it wants (e.g. intermittently not work, list files but deny access later, ignore permissions advertised, etc) regardless of what permissions you see via the local file system abstraction.


:idea: TL;DR You'll want to find a more reliable network / remote file system / remote file system service / server / configuration / etc.
:idea: Please read the FAQ and How to Request Help.

jp4500
Posts: 31
Joined: 23 Aug 2015, 01:55

Re: "Invalid file path" error on Raspberry Pi 4

Post by jp4500 » 06 Dec 2019, 17:42

Thanks for the quick replies!!

Sorry, I know it probably isn't the best but I was trying to hide the actual filename itself even though there's no non-ASCII characters or anything like that which I'm guessing you're looking for. The few times this has happened before the file names didn't have anything unusual in them.

I just ran the command again - this time using the movie folder as input so it's the only media file that will be found:

Code: Select all

Run script [fn:amc] at [Fri Dec 06 12:28:54 EST 2019]
Parameter: artwork = y
Parameter: seriesFormat = /media/MEDIA/TV/{ny}/Season {s}\{n} - S{s.pad(2)}E{e.pad(2)} - {t}
Parameter: movieFormat = /media/MEDIA/DVD/{n} ({y})/{n} ({y})
Argument[0]: /media/MEDIA/INCOMING/Test.Movie.2019.1080p.WEBRip.DD5.1.x264-CM
Invalid file path: /media/MEDIA/INCOMING/Test.Movie.2019.1080p.WEBRip.DD5.1.x264-CM/Test.Movie.2019.1080p.WEBRip.DD5.1.x264-CM.mkv
No files selected for processing
Done ¯\_(ツ)_/¯
---------

I did try something else and I'm not sure if this points to the issue or not since I haven't used this command before.

Code: Select all

filebot.sh -mediainfo . --format "[{source}] {fn}"
[WEBRIP] RARBG
That's the entire output of that 'mediainfo' command.. as I understand it the {fn} param *should* print out the entire filename.. is that right?

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

Re: "Invalid file path" error on Raspberry Pi 4

Post by rednoah » 06 Dec 2019, 17:55

Doesn't make sense. Looks like your remote file system lies when asked questions like "Is this a folder?" and "Is this a file?".

You can use this for debugging:

Code: Select all

filebot -mediainfo -r . --format "{f} | {f.isFile()} | {f.isDirectory()}"
:idea: Please read the FAQ and How to Request Help.

jp4500
Posts: 31
Joined: 23 Aug 2015, 01:55

Re: "Invalid file path" error on Raspberry Pi 4

Post by jp4500 » 06 Dec 2019, 18:23

>> Doesn't make sense
To me either!

FWIW - I'm using a Synology NAS and there's 2 files in that folder.

Code: Select all

$ ls -al
total 6283504
-rwxr-xr-x 1 pi pi 6434301987 Dec  3 11:50 Test.Movie.2019.1080p.WEBRip.DD5.1.x264-CM.mkv
-rwxr-xr-x 1 pi pi         31 Dec  3 11:50 RARBG.txt

filebot.sh -mediainfo -r . --format "{f} | {f.isFile()} | {f.isDirectory()}"
/media/MEDIA/INCOMING/Test.Movie.2019.1080p.WEBRip.DD5.1.x264-CM/RARBG.txt | true | false
That .mkv doesn't show up as either a file or directory! It IS a really large file - 6.4 Gig. This has happened to a much smaller file in the past but I don't have the example to test with anymore.

I guess at this point it seems like maybe it's an issue with my NAS vs anything filebot related though

jp4500
Posts: 31
Joined: 23 Aug 2015, 01:55

Re: "Invalid file path" error on Raspberry Pi 4

Post by jp4500 » 06 Dec 2019, 18:29

just a quick update.. I manually moved the movie file to my movies folder where filebot would normally move it to. Kodi picked it up and it plays just fine.

I also didn't see any hard drive issues on my Synology NAS (not saying there couldn't be any -- just none were reported)

Anyway, just wondering if this issue is more related to the 'mediainfo' library running on a Raspberry Pi 4 instead of my NAS.

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

Re: "Invalid file path" error on Raspberry Pi 4

Post by rednoah » 06 Dec 2019, 18:40

Yes, inconsistent file listing would point towards buggy remote file system.

:arrow: You can always test with local files, that can't not work, so check filebot against that, and that'll tell us if filebot is fundamentally working correctly or not.
:idea: Please read the FAQ and How to Request Help.

Post Reply