Original Post — Direct link

I'm running without mods and the problem persisted after renaming the config folder to force the game to recreate it.

The following log entry was generated by selecting a pawn and then right-clicking a plasteel dagger.

Root level exception in OnGUI(): System.InvalidOperationException: Sequence contains no matching element
  at System.Linq.Enumerable.First[TSource] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] predicate) [0x00011] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 
  at RimWorld.RitualBehaviorWorker_Conversion.CanStartRitualNow (Verse.TargetInfo target, RimWorld.Precept_Ritual ritual, Verse.Pawn selectedPawn, System.Collections.Generic.Dictionary`2[TKey,TValue] forcedForRole) [0x0000b] in <69bb6e66186e424eb26bbf02d65f9e35>:0 
  at Verse.Thing+d__144.MoveNext () [0x0015e] in <69bb6e66186e424eb26bbf02d65f9e35>:0 
  at Verse.ThingWithComps+d__40.MoveNext () [0x00078] in <69bb6e66186e424eb26bbf02d65f9e35>:0 
  at RimWorld.FloatMenuMakerMap.AddHumanlikeOrders (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Collections.Generic.List`1[T] opts) [0x042f2] in <69bb6e66186e424eb26bbf02d65f9e35>:0 
  at RimWorld.FloatMenuMakerMap.ChoicesAtFor (UnityEngine.Vector3 clickPos, Verse.Pawn pawn, System.Boolean suppressAutoTakeableGoto) [0x000a5] in <69bb6e66186e424eb26bbf02d65f9e35>:0 
  at RimWorld.FloatMenuMakerMap.TryMakeFloatMenu (Verse.Pawn pawn) [0x000a1] in <69bb6e66186e424eb26bbf02d65f9e35>:0 
  at RimWorld.Selector.HandleMapClicks () [0x000a9] in <69bb6e66186e424eb26bbf02d65f9e35>:0 
  at RimWorld.Selector.SelectorOnGUI () [0x00000] in <69bb6e66186e424eb26bbf02d65f9e35>:0 
  at RimWorld.MapInterface.HandleLowPriorityInput () [0x0000f] in <69bb6e66186e424eb26bbf02d65f9e35>:0 
  at RimWorld.UIRoot_Play.UIRootOnGUI () [0x000dd] in <69bb6e66186e424eb26bbf02d65f9e35>:0 
  at Verse.Root.OnGUI () [0x0003d] in <69bb6e66186e424eb26bbf02d65f9e35>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.Root:OnGUI ()

The problem was not present in a new game started with one of the premade ideologies. Loading into the save from the custom ideology run immediately resulted in the problem returning.

External link →
almost 3 years ago - /u/TynanSylvester - Direct link

We believe this is caused if you delete the leader and moral guide roles of your ideoligion.

This shouldn't be possible, but nobody realized it was during testing! We're pushing a hotfix within the hour to make it impossible.

For now, just don't delete those roles! If you did, you may be able to activate devmode and add them to the ideology with the edit mode checkbox in its top right (I don't know if this would work - maybe).