ShokoServer icon indicating copy to clipboard operation
ShokoServer copied to clipboard

No script available for renamer for non-Windows path

Open bigretromike opened this issue 2 years ago • 2 comments

VERSION INFORMATION

Server Version: 4.1.1 (daily from yestarday)

Desktop Version: none

If you've compiled your own version, please use the last commit you compiled.

LOG FILE

System.Exception: *Error: No script available for renamer at Shoko.Server.Renamer.LegacyRenamer.GetFilename(RenameEventArgs args) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Renamer\LegacyRenamer.cs:line 30 at Shoko.Server.Renamer.GroupAwareRenamer.GetFilename(RenameEventArgs args) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Renamer\GroupAwareSortingRenamer.cs:line 21 at Shoko.Server.RenameFileHelper.GetFilename(SVR_VideoLocal_Place place, String scriptName) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Renamer\RenameFileHelper.cs:line 72 at Shoko.Server.Models.SVR_VideoLocal_Place.RenameFile(Boolean preview, String scriptName) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Models\SVR_VideoLocal_Place.cs:line 64 at Shoko.Server.Models.SVR_VideoLocal_Place.RenameIfRequired() in D:\a\ShokoServer\ShokoServer\Shoko.Server\Models\SVR_VideoLocal_Place.cs:line 526

DESCRIPTION

After changing grouping setting and hiting recreate action and leaving it for some time (after long not running it at all) there is that error while he tries to check if files are available and the files was moved by hand when shoko was offline.

STEPS TO REPRODUCE

Being as detailed as possible, please list all steps need to reproduce the issue, if we can't reproduce it then we can't fix it.

bigretromike avatar May 26 '22 10:05 bigretromike

Destination is set to \\AKIRA\anime\

2022-05-28 22:00:00
System.ArgumentException: Drive name must be a root directory (i.e. 'C:\') or a drive letter ('C'). (Parameter 'driveName') at System.IO.DriveInfoInternal.NormalizeDriveName(String driveName) at System.IO.DriveInfo..ctor(String driveName) at Shoko.Server.Renamer.LegacyRenamer.GetDestinationFolder(MoveEventArgs args) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Renamer\LegacyRenamer.cs:line 2040
2022-05-28 22:00:00
Could not find a valid destination: "\\AKIRA\photo\NewNew\[SubsPlease] Legend of the Galactic Heroes - Die Neue These - 33 (1080p) [11D321EB].mkv"
2022-05-28 22:00:00
System.Exception: *Error: No script available for renamer at Shoko.Server.Renamer.LegacyRenamer.GetFilename(RenameEventArgs args) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Renamer\LegacyRenamer.cs:line 30 at Shoko.Server.RenameFileHelper.GetFilename(SVR_VideoLocal_Place place, String scriptName) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Renamer\RenameFileHelper.cs:line 72 at Shoko.Server.Models.SVR_VideoLocal_Place.RenameFile(Boolean preview, String scriptName) in D:\a\ShokoServer\ShokoServer\Shoko.Server\Models\SVR_VideoLocal_Place.cs:line 64 at Shoko.Server.Models.SVR_VideoLocal_Place.RenameIfRequired() in D:\a\ShokoServer\ShokoServer\Shoko.Server\Models\SVR_VideoLocal_Place.cs:line 533

bigretromike avatar May 28 '22 20:05 bigretromike

I also got the same error from the OP

[2022-07-03 22:45:00:964] Info|SVR_VideoLocal_Place.RenameAndMoveAsRequired => SVR_VideoLocal_Place.MoveFileIfRequired => ShokoServer.PauseWatchingFiles Paused Filesystem Watching
[2022-07-03 22:45:00:964] Info|<>c.<ProcessCommand>b__19_0 => SVR_VideoLocal_Place.RenameAndMoveAsRequired => SVR_VideoLocal_Place.MoveFileIfRequired Moving file from "D:\Weebshit\[SubsPlease] Log Horizon S3 - 12 (1080p) [F75BAD0D].mkv" to "D:\Anime\Log Horizon։ Entaku Houkai\[SubsPlease] Log Horizon S3 - 12 (1080p) [F75BAD0D].mkv"
[2022-07-03 22:45:00:979] Info|SVR_VideoLocal_Place.RenameAndMoveAsRequired => SVR_VideoLocal_Place.MoveFileIfRequired => ShokoServer.UnpauseWatchingFiles Unpaused Filesystem Watching
[2022-07-03 22:45:00:979] Error|<>c.<ProcessCommand>b__19_0 => SVR_VideoLocal_Place.RenameAndMoveAsRequired => SVR_VideoLocal_Place.RenameIfRequired System.Exception: *Error: No script available for renamer
   at Shoko.Server.Renamer.LegacyRenamer.GetFilename(RenameEventArgs args) in E:\Documents\GitHub\ShokoServer\Shoko.Server\Renamer\LegacyRenamer.cs:line 30
   at Shoko.Server.Renamer.GroupAwareRenamer.GetFilename(RenameEventArgs args) in E:\Documents\GitHub\ShokoServer\Shoko.Server\Renamer\GroupAwareSortingRenamer.cs:line 21
   at Shoko.Server.RenameFileHelper.GetFilename(SVR_VideoLocal_Place place, String scriptName) in E:\Documents\GitHub\ShokoServer\Shoko.Server\Renamer\RenameFileHelper.cs:line 72
   at Shoko.Server.Models.SVR_VideoLocal_Place.RenameFile(Boolean preview, String scriptName) in E:\Documents\GitHub\ShokoServer\Shoko.Server\Models\SVR_VideoLocal_Place.cs:line 64
   at Shoko.Server.Models.SVR_VideoLocal_Place.RenameIfRequired() in E:\Documents\GitHub\ShokoServer\Shoko.Server\Models\SVR_VideoLocal_Place.cs:line 526

I do not actively maintain my database, but this was logged for all files in my drop directory after updating to 4.1.2 (from 4.1.0) However, the server did move files into their destination directories, with files that haven't been moved in what feels like years have finally been imported

Scrxtchy avatar Jul 03 '22 13:07 Scrxtchy

Don't leave the script blank when using the legacy renamer.

To fix this then you need to go into shoko desktop, find the rename util, the select the script and renamer, check the box where it says to run it on import, the press save.

If you don't have a script for the legacy renamer to use then i suggest either downloading the example script, switching to a different renamer, or just simply disabling rename/move on import.

revam avatar Apr 07 '23 03:04 revam