Re-Naming Error

When I go to a series and hit the “Rename all episode in this series” or Rename all episode in season 1, 2, 3 etc…

Message:

Request Failed: Object reference not set to an instance of an object.

Exception:

System.NullReferenceException: Object reference not set to an instance of an object.
at NzbDrone.Core.Organizer.FileNameBuilder.ReplaceToken(Match match, Dictionary2 tokenHandlers) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\Organizer\FileNameBuilder.cs:line 498 at NzbDrone.Core.Organizer.FileNameBuilder.<>c__DisplayClass31.<ReplaceTokens>b__30(Match match) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\Organizer\FileNameBuilder.cs:line 476 at System.Text.RegularExpressions.RegexReplacement.Replace(MatchEvaluator evaluator, Regex regex, String input, Int32 count, Int32 startat) at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator, Int32 count, Int32 startat) at System.Text.RegularExpressions.Regex.Replace(String input, MatchEvaluator evaluator) at NzbDrone.Core.Organizer.FileNameBuilder.ReplaceTokens(String pattern, Dictionary2 tokenHandlers) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\Organizer\FileNameBuilder.cs:line 476
at NzbDrone.Core.Organizer.FileNameBuilder.BuildFileName(List1 episodes, Series series, EpisodeFile episodeFile, NamingConfig namingConfig) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\Organizer\FileNameBuilder.cs:line 196 at NzbDrone.Core.MediaFiles.RenameEpisodeFileService.<GetPreviews>d__c.MoveNext() in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\RenameEpisodeFileService.cs:line 89 at System.Linq.Buffer1…ctor(IEnumerable1 source) at System.Linq.OrderedEnumerable1.d__0.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at NzbDrone.Core.MediaFiles.RenameEpisodeFileService.GetRenamePreviews(Int32 seriesId, Int32 seasonNumber) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Core\MediaFiles\RenameEpisodeFileService.cs:line 70 at NzbDrone.Api.Episodes.RenameEpisodeModule.<>c__DisplayClassf.<GetEpisodes>b__b() in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Api\Episodes\RenameEpisodeModule.cs:line 36 at NzbDrone.Api.NzbDroneRestModule1.ToListResource[TModel](Func1 function) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Api\NzbDroneRestModule.cs:line 36 at NzbDrone.Api.Episodes.RenameEpisodeModule.GetEpisodes() in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Api\Episodes\RenameEpisodeModule.cs:line 36 at NzbDrone.Api.REST.RestModule1.<set_GetResourceAll>b__c(Object options) in m:\BuildAgent2\work\328d72309b633a8\src\NzbDrone.Api\REST\RestModule.cs:line 111
at CallSite.Target(Closure , CallSite , Func`2 , Object )
at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)

Which version of drone?
Whats the series type?
What are the rename options set to? (Screenshot please)

Version 2.0.0.1861
Series type: it happen to Standard & Anime

I can’t upload Image as a new user so:

Rename Episodes: [YES]

Standard Episode Format: {Series.Title}.S{season:00}E{episode:00}.{Quality.Title}
Daily Episode Format: {Series.Title}.{Air-Date}.{Quality.Title}
Anime Episode Format: {Series.Title}.S{season:00}E{episode:00}.{Quality.Title}.[{Release Group}].{Original Title}
Series Folder Format: {Series Title}
Season Folder Format: Season {season:00}

Could you pm me your database (nzbdrone.db), you can find the location on System : Info more details: https://github.com/NzbDrone/NzbDrone/wiki/Backup-and-Restore

I haven’t been able to reproduce this myself, yet.

Hi Markus, I have sent the requested information.

Thanks, I was able to find the issue; the issue is the original title, if its blank you get this error. I have pushed a fix for it to develop, which will leave it blank, instead of erroring out.