NoSuchFileException

Running FileBot from the console, Groovy scripting, shell scripts, etc
Post Reply
adante
Posts: 4
Joined: 18 Dec 2017, 04:02

NoSuchFileException

Post by adante »

Hi, I'm a first time user of FileBot here and I'm running into a NoSuchFileException. I'm not sure if I'm committing a rookie error or there is some more deep rooted problem here.

I've tried to demonstrate the files that exist and that I can write to them (the other errors relating to NoSuchFileException that I've googled appear to be permission related). The file I'm trying to rename is /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi

Code: Select all

[redact]@[redact]:/mnt/media1/tv/Archer$ pwd
/mnt/media1/tv/Archer
[redact]@[redact]:/mnt/media1/tv/Archer$ ls -al
total 179852
drwxrwxr-x+ 1 [redact] [redact]        62 Dec 18 14:19 .
drwxrwxr-x+ 1 [redact] [redact]     59846 Dec 18 14:19 ..
-rwxrwxr-x+ 1 [redact] [redact] 184166400 Jun 17  2015 Archer.S01E01.HDTV.XviD-SYS.avi



[redact]@[redact]:/mnt/media1/tv/Archer$ test -w . || echo "cant write"
[redact]@[redact]:/mnt/media1/tv/Archer$ test -w Archer.S01E01.HDTV.XviD-SYS.avi || echo "cant write"

[redact]@[redact]:/mnt/media1/tv/Archer$ filebot -rename Archer.S01E01.HDTV.XviD-SYS.avi
Illegal Argument: java.nio.file.NoSuchFileException: /tmp/hsperfdata_[redact]/Archer.S01E01.HDTV.XviD-SYS.avi (Archer.S01E01.HDTV.XviD-SYS.avi)
Failed to read xattr: NoSuchFileException: Archer.S01E01.HDTV.XviD-SYS.avi
Failed to read xattr: NoSuchFileException: Archer.S01E01.HDTV.XviD-SYS.avi
Failed to read xattr: NoSuchFileException: Archer.S01E01.HDTV.XviD-SYS.avi
java.lang.NullPointerException
java.util.concurrent.ExecutionException: java.lang.NullPointerException
        at net.filebot.media.AutoDetection.lambda$group$6(AutoDetection.java:145)
        at net.filebot.media.AutoDetection.group(AutoDetection.java:143)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:112)
        at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:88)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:26)
        at net.filebot.Main.main(Main.java:115)
Caused by: java.lang.NullPointerException
        at net.filebot.similarity.SeriesNameMatcher.matchAll(SeriesNameMatcher.java:66)
        at net.filebot.media.MediaDetection.detectSeriesNames(MediaDetection.java:421)
        at net.filebot.media.MediaDetection.detectSeriesNames(MediaDetection.java:322)
        at net.filebot.media.AutoDetection.getSeriesMatches(AutoDetection.java:188)
        at net.filebot.media.AutoDetection.detectGroup(AutoDetection.java:165)
        at net.filebot.media.AutoDetection.lambda$null$3(AutoDetection.java:143)

Failed to identify or process any files
Failure (°_°)

[redact]@[redact]:/mnt/media1/tv/Archer$ filebot -rename "Archer.S01E01.HDTV.XviD-SYS.avi"
Illegal Argument: java.nio.file.NoSuchFileException: /tmp/hsperfdata_[redact]/Archer.S01E01.HDTV.XviD-SYS.avi (Archer.S01E01.HDTV.XviD-SYS.avi)
Failed to read xattr: NoSuchFileException: Archer.S01E01.HDTV.XviD-SYS.avi
Failed to read xattr: NoSuchFileException: Archer.S01E01.HDTV.XviD-SYS.avi
Failed to read xattr: NoSuchFileException: Archer.S01E01.HDTV.XviD-SYS.avi
java.lang.NullPointerException
java.util.concurrent.ExecutionException: java.lang.NullPointerException
        at net.filebot.media.AutoDetection.lambda$group$6(AutoDetection.java:145)
        at net.filebot.media.AutoDetection.group(AutoDetection.java:143)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:112)
        at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:88)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:26)
        at net.filebot.Main.main(Main.java:115)
Caused by: java.lang.NullPointerException
        at net.filebot.similarity.SeriesNameMatcher.matchAll(SeriesNameMatcher.java:66)
        at net.filebot.media.MediaDetection.detectSeriesNames(MediaDetection.java:421)
        at net.filebot.media.MediaDetection.detectSeriesNames(MediaDetection.java:322)
        at net.filebot.media.AutoDetection.getSeriesMatches(AutoDetection.java:188)
        at net.filebot.media.AutoDetection.detectGroup(AutoDetection.java:165)
        at net.filebot.media.AutoDetection.lambda$null$3(AutoDetection.java:143)

Failed to identify or process any files
Failure (°_°)

[redact]@[redact]:/mnt/media1/tv/Archer$ filebot -rename /mnt/media1/tv/Archer
Illegal Argument: java.nio.file.NoSuchFileException: /mnt/media1/tv/Archer (/mnt/media1/tv/Archer)
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer
Rename movies using [TheMovieDB]
No media files: [/mnt/media1/tv/Archer]
Failure (°_°)


[redact]@[redact]:/mnt/media1/tv/Archer$ filebot -script fn:sysinfo
FileBot 4.7.9 (r4986)
JNA Native: 5.1.0
MediaInfo: 0.7.82
7-Zip-JBinding: 9.20
Chromaprint: 1.2.0
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2017-11-21 (r512)
Groovy: 2.4.10
JRE: OpenJDK Runtime Environment 1.8.0_121
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 2 Core / 444 MB Max Memory / 26 MB Used Memory
OS: Linux (amd64)
Package: SNAP
uname: Linux [redact] 4.13.0-17-generic #20-Ubuntu SMP Mon Nov 6 10:04:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
Done ヾ(@⌒ー⌒@)ノ


I've also tried a few more variations on the filename but without much luck. Can somebody please provide some hints as to what I'm doing wrong?
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: NoSuchFileException

Post by rednoah »

What happens if you call filebot on the whole folder?

Code: Select all

filebot -rename .
:idea: Please read the FAQ and How to Request Help.
adante
Posts: 4
Joined: 18 Dec 2017, 04:02

Re: NoSuchFileException

Post by adante »

Code: Select all

[redact]@[redact]:/mnt/media1/tv/Archer$ filebot -rename .
Rename episodes using [TheTVDB]
No media files: [/tmp/hsperfdata_[redact]/6939]
Failure (°_°)
This seems to take a long time (10-15 seconds?) and interestingly (or not?) the behaviour is different from if I run filebot with the full file path (2nd last command in my OP)
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: NoSuchFileException

Post by rednoah »

This is very strange. Why does the file path resolve to some sort of temporary folder? There's definitely something special going on with the mount point. Is this a remote filesystem?
:idea: Please read the FAQ and How to Request Help.
adante
Posts: 4
Joined: 18 Dec 2017, 04:02

Re: NoSuchFileException

Post by adante »

I'd noticed that but because I'd never seen filebot work properly I thought maybe it was normal that it used a temp folder to do things.

Now that I've googled it, looks like it's a java hotspot performance data log store. Perhaps it is somehow polluting into the filebot variable space (I don't see how though unless it is some environment variables thing).

There's nothing much special about that mount point. It's a fairly standard btrfs mount

Code: Select all

[redact]@[redact]:/mnt/media1/tv$ mount | grep media1
/dev/sda on /mnt/media1 type btrfs (rw,relatime,space_cache,subvolid=5,subvol=/)
That said, it definitely seems to be something about that mount. I just tested in my home directory (I didn't try this before because I didn't realise the temp thing was that anomalous) and it seems to work okay:

Code: Select all

[redact]@[redact]:~$ cd ~
[redact]@[redact]:~$ touch Archer.S01E01.HDTV.XviD-SYS.avi

[redact]@[redact]:~$ filebot -rename Archer.S01E01.HDTV.XviD-SYS.avi
Rename episodes using [TheTVDB]
Auto-detected query: [Archer]
Multiple options: Advanced auto-selection requires -non-strict matching: [Archer, Archer (2009)]
Failure (°_°)

[redact]@[redact]:~$ filebot -rename Archer.S01E01.HDTV.XviD-SYS.avi -non-strict
Rename episodes using [TheTVDB]
Auto-detected query: [Archer]
Fetching episode data for [Archer]
Fetching episode data for [Archer (2009)]
[MOVE] From [/home/[redact]/Archer.S01E01.HDTV.XviD-SYS.avi] to [/home/[redact]/Archer (2009) - 1x01 - Mole Hunt.avi]
Processed 1 files
Thank you - this gives me a lead at least. I'll do some more digging when I have a bit more time.
User avatar
rednoah
The Source
Posts: 22984
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: NoSuchFileException

Post by rednoah »

So what filebot does when you pass in a path as argument, filebot will asking the operating system for the canonical / absolute file path. This means that the operating system will give back the real path and resolve symbolic links, maybe canonicalize character encoding, etc.

No idea what's going on your machine. Maybe something inside the Java platform / OS filesystem layer is doing something strange. Maybe $HOME and $CWD is somehow messed up before FileBot is executed leading to invalid file paths when relative input arguments are resolved to absolute paths.

What happens if you always use absolute paths for input arguments? i.e. not "." or "filename.avi"
:idea: Please read the FAQ and How to Request Help.
adante
Posts: 4
Joined: 18 Dec 2017, 04:02

Re: NoSuchFileException

Post by adante »

rednoah wrote: 19 Dec 2017, 10:41 So what filebot does when you pass in a path as argument, filebot will asking the operating system for the canonical / absolute file path. This means that the operating system will give back the real path and resolve symbolic links, maybe canonicalize character encoding, etc.

No idea what's going on your machine. Maybe something inside the Java platform / OS filesystem layer is doing something strange. Maybe $HOME and $CWD is somehow messed up before FileBot is executed leading to invalid file paths when relative input arguments are resolved to absolute paths.

What happens if you always use absolute paths for input arguments? i.e. not "." or "filename.avi"
The plot thickens a bit.

The canonical path from readlink seems to return the appropriate value.

Interestingly when I call like you suggested (absolute path) it throws same-same-but-different errors (warnings?) and then a message about non-strict warnings.

If I call again with -non-strict, it prints the errors/warnings but then still appears to attempt to rename the file! But then fails because the root filesystem is read-only. This is intentional - but that directory and the file within it are writeable (see my last mv command) so I'm not sure why this is an issue.

Code: Select all

[redact]@[redact]:/mnt/media1/tv/Archer$ pwd
/mnt/media1/tv/Archer

[redact]@[redact]:/mnt/media1/tv/Archer$ readlink -f Archer.S01E01.HDTV.XviD-SYS.avi
/mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi

[redact]@[redact]:/mnt/media1/tv/Archer$ filebot -rename /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Illegal Argument: java.nio.file.NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi (/mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi)
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Rename episodes using [TheTVDB]
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Auto-detected query: [Archer]
Multiple options: Advanced auto-selection requires -non-strict matching: [Archer, Archer (2009)]
Failure (°_°)


[redact]@[redact]:/mnt/media1/tv/Archer$ filebot -non-strict -rename /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Illegal Argument: java.nio.file.NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi (/mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi)
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Rename episodes using [TheTVDB]
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Auto-detected query: [Archer]
Fetching episode data for [Archer]
Fetching episode data for [Archer (2009)]
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
Failed to read xattr: NoSuchFileException: /mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi
[MOVE] From [/mnt/media1/tv/Archer/Archer.S01E01.HDTV.XviD-SYS.avi] to [/mnt/media1/tv/Archer/Archer (2009) - 1x01 - Mole Hunt.avi]
[MOVE] Failure: java.nio.file.FileSystemException: /mnt/media1: Read-only file system
Processed 0 files
/mnt/media1: Read-only file system
java.nio.file.FileSystemException: /mnt/media1: Read-only file system
        at net.filebot.util.FileUtilities.resolveDestination(FileUtilities.java:116)
        at net.filebot.util.FileUtilities.moveRename(FileUtilities.java:61)
        at net.filebot.StandardRenameAction$1.rename(StandardRenameAction.java:22)
        at net.filebot.cli.CmdlineOperations.renameAll(CmdlineOperations.java:616)
        at net.filebot.cli.CmdlineOperations.renameSeries(CmdlineOperations.java:245)
        at net.filebot.cli.CmdlineOperations.rename(CmdlineOperations.java:120)
        at net.filebot.cli.ArgumentProcessor.runCommand(ArgumentProcessor.java:88)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:26)
        at net.filebot.Main.main(Main.java:115)

Failure (°_°)

[redact]@[redact]:/mnt/media1/tv/Archer$ mv Archer.S01E01.HDTV.XviD-SYS.avi test

[redact]@[redact]:/mnt/media1/tv/Archer$ ls -al test
-rwxrwxr-x+ 1 [redact] [redact] 184166400 Jun 17  2015 test

[redact]@[redact]:/mnt/media1/tv/Archer$ mv test Archer.S01E01.HDTV.XviD-SYS.avi
Post Reply