Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error executing InsertTocCommand #554

Closed
gpbicego opened this issue Aug 4, 2022 · 0 comments · Fixed by #564
Closed

Error executing InsertTocCommand #554

gpbicego opened this issue Aug 4, 2022 · 0 comments · Fixed by #564
Assignees
Labels
bug Something isn't working released Available in a released installer

Comments

@gpbicego
Copy link

gpbicego commented Aug 4, 2022

Describe the bug
14456:6] Running command InsertTocCommand
14456:6] ..error executing InsertTocCommand
14456:6] ..System.InvalidOperationException
Message: Sequence contains no elements
Source: System.Core
StackTrace: at System.Linq.Enumerable.Last[TSource](IEnumerable1 source) at River.OneMoreAddIn.Commands.InsertTocCommand.BuildHeadings(XElement container, List1 headings, Int32& index, Int32 level, Boolean dark)
at River.OneMoreAddIn.Commands.InsertTocCommand.d__10.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at River.OneMoreAddIn.Commands.InsertTocCommand.d__8.MoveNext()
TargetSite: [System.Core] System.Linq.Enumerable::Last()

To Reproduce
Steps to reproduce the behavior:

  1. Make a new OneNote page
  2. Add "Heading 2" before "Heading 1"
  3. OneMore: "Insert table of headings on this page"
  4. See error

Expected behavior
image

Screenshots
image

Environment (if applicable):

  • OneNote Version: O365 64bit OneNote Version 2206 (Build 15330.20264)
  • OneMore Version 4.18

Additional context
page.zip

@gpbicego gpbicego added bug Something isn't working unread I have seen it or had time to refine it yet labels Aug 4, 2022
@stevencohn stevencohn removed the unread I have seen it or had time to refine it yet label Aug 4, 2022
@stevencohn stevencohn self-assigned this Aug 22, 2022
@stevencohn stevencohn linked a pull request Aug 22, 2022 that will close this issue
@stevencohn stevencohn added the next-release Addressed but not yet released label Aug 22, 2022
@stevencohn stevencohn added released Available in a released installer and removed next-release Addressed but not yet released labels Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Available in a released installer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants