It seems this error is caused by same series names. In this case I narrowed it down to “After Life” and “Afterlife” series. Will this bug be fixed in the near future? Otherwise are there any reasonable workaround? Other threads only suggest removing the series but that’s hardly a solution.
Request Failed. GET /api/manualimport: Sequence contains more than one element
Sonarr version (exact version): 2.0.0.5322 - 25 Mar 2019 Mono version (if Sonarr is not running on Windows): OS: Fedora 29 Description of issue: Manual import fails with error below.
Cant post entire log, too much info there. Debug log snippet:
19-6-26 17:18:28.0|Fatal|NzbDroneErrorPipeline|Request Failed. GET /api/manualimport [v2.0.0.5322] System.InvalidOperationException: Sequence contains more than one element at System.Linq.Enumerable.SingleOrDefault[TSource] (System.Collections.Generic.IEnumerable1[T] source) [0x000a3] in <2392cff65f724abaaed9de072f62bc4a>:0 at NzbDrone.Core.Tv.SeriesRepository.FindByTitle (System.String cleanTitle) [0x00086] in <6a3dcbc5b3c2463890627fff9fca65cd>:0 at NzbDrone.Core.Tv.SeriesService.FindByTitle (System.String title) [0x0000c] in <6a3dcbc5b3c2463890627fff9fca65cd>:0 at NzbDrone.Core.Parser.ParsingService.GetSeries (System.String title) [0x00057] in <6a3dcbc5b3c2463890627fff9fca65cd>:0 at NzbDrone.Core.MediaFiles.EpisodeImport.Manual.ManualImportService.ProcessFile (System.String rootFolder, System.String baseFolder, System.String file, System.String downloadId) [0x00026] in <6a3dcbc5b3c2463890627fff9fca65cd>:0 at NzbDrone.Core.MediaFiles.EpisodeImport.Manual.ManualImportService+<>c__DisplayClass15_0.<ProcessFolder>b__0 (System.String file) [0x00000] in <6a3dcbc5b3c2463890627fff9fca65cd>:0 at System.Linq.Enumerable+WhereSelectListIterator2[TSource,TResult].MoveNext () [0x00064] in <2392cff65f724abaaed9de072f62bc4a>:0 at System.Linq.Enumerable+<ConcatIterator>c__IteratorE1[TSource].MoveNext () [0x0007f] in <2392cff65f724abaaed9de072f62bc4a>:0 at System.Linq.Enumerable+WhereEnumerableIterator1[TSource].MoveNext () [0x00062] in <2392cff65f724abaaed9de072f62bc4a>:0 at System.Collections.Generic.List1[T]..ctor (System.Collections.Generic.IEnumerable1[T] collection) [0x0008b] in <dbb16e0bacdc4a0f87478e401bc29b6c>:0 at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable1[T] source) [0x00011] in <2392cff65f724abaaed9de072f62bc4a>:0 at NzbDrone.Core.MediaFiles.EpisodeImport.Manual.ManualImportService.ProcessFolder (System.String rootFolder, System.String baseFolder, System.String downloadId) [0x00126] in <6a3dcbc5b3c2463890627fff9fca65cd>:0 at NzbDrone.Core.MediaFiles.EpisodeImport.Manual.ManualImportService.GetMediaFiles (System.String path, System.String downloadId) [0x00072] in <6a3dcbc5b3c2463890627fff9fca65cd>:0 at NzbDrone.Api.ManualImport.ManualImportModule.GetMediaFiles () [0x001c4] in <fbb469bed1c74e3ab2a924ad832b8548>:0 at NzbDrone.Api.REST.RestModule1[TResource].<set_GetResourceAll>b__32_0 (System.Object options) [0x00006] in <fbb469bed1c74e3ab2a924ad832b8548>:0 at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,System.Func`2<object, object>,object) at Nancy.Routing.Route+<>c__DisplayClass4.<Wrap>b__3 (System.Object parameters, System.Threading.CancellationToken context) [0x00049] in <63c44d6f8d7e4f339a987bf9eb94d931>:0 19-6-26 17:18:28.0|Debug|Api|[GET] /api/manualimport?folder=%2Fmnt%2Fdownloads%2Fnzbget%2Fseries%2F&sort_by=qualityWeight&order=desc: 500.InternalServerError (16 ms)
That’s why we ask you to post it elsewhere and link it here.
Which file are you trying to import files for an how are they named?
We’re going to need to add an alias to avoid the conflicting clean titles as that is how Sonarr determines which series the release is for. Beyond that we should be able to prevent Manual Import from failing in this way.
Still publish so I don’t see how its any better to post a link.
I did some testing and “After.Life.S01E01.ext” fails while “After.Life.ext” works. The two series names are different in that one has a space in title and other doesn’t. Not sure how clean titles are generated but maybe its just an issue with special characters like spaces being stripped/ignored?
Still publish so I don’t see how its any better to post a link.
Still publish?
It’s better because you don’t need to have a mile long post and you can switch between the logs and posts without needing to scroll constantly.
The two series names are different in that one has a space in title and other doesn
Right, I can see that.
Not sure how clean titles are generated but maybe its just an issue with special characters like spaces being stripped/ignored?
Special characters and common words are removed, this works fine for the vast majority of series and releases (handling minor differences in formatting, including spaces vs periods), but does have some edge cases, but those edge cases are a reasonable trade off and can be overcome with aliases.
I don’t know enough about how this worked under the hood so I’ll take your word. Is this something that will be in stable branch in the near future? Any simple workarounds in the mean while?