# Pandoc throwing exception for --split-level

**URL:** <https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120>\
**Category:** Scrivener for Windows\
**Tags:** support\
**Created:** [June 24, 2026, 9:28pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120 "2026-06-24T21:28:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arywillis](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@Arywillis](https://forum.literatureandlatte.com/u/Arywillis)\
**Post date:** [June 24, 2026, 9:28pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/1 "2026-06-24T21:28:24Z")

</div>

I have searched and found that when Pandoc 3 came out I guess it was initially tolerant of the issue but I’m finding its throwing an exception and failing out. I have the log window turned on and seeing the error. Is there a file to edit, or a setting to modify what Scrivener is send to Pandoc as the arguments?

Debug: Executed: “C:/Program Files/Pandoc/pandoc.exe”  
Debug: Arguments: "–epub-metadata=metadata.xml --epub-chapter-level=1 -t epub -o

---

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [June 24, 2026, 9:36pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/2 "2026-06-24T21:36:48Z")

</div>

I haven’t installed 3.10 into my Wine setup yet, and am still using 3.9.x (which throws the warning about the deprecated function, but still creates an .epub file). Are you using 3.10?

---

<div class="post-metadata">

**Author:** ![Arywillis](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@Arywillis](https://forum.literatureandlatte.com/u/Arywillis)\
**Post date:** [June 24, 2026, 9:43pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/3 "2026-06-24T21:43:33Z")

</div>

yes pandoc is 3.10. and discord wants 20 characters so this is just filler

---

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [June 24, 2026, 9:47pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/4 "2026-06-24T21:47:12Z")

</div>

Well that’s annoying if support has been cut off before 4.x, but I guess it was bound to happen eventually. We actually already have this fixed in an internal build, but unfortunately that build was also unstable. It will definitely be using the modern flag in the next official build.

There is no really good workaround. The command line is hard-coded rather than something you can edit in a file somewhere, and while ordinarily the Processing compile format pane will let you do whatever you want—with ePub in particular there is a fair amount of automation we are doing to set metadata, CSS, cover page and so forth. These are all things that would not be produced when using the plain “MultiMarkdown” option where you can access the Processing pane and set the command line.

Honestly the best might be to downgrade to 3.9 for the time being if it is critical to be using Scrivener’s automation.

---

<div class="post-metadata">

**Author:** ![Arywillis](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@Arywillis](https://forum.literatureandlatte.com/u/Arywillis)\
**Post date:** [June 24, 2026, 9:52pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/5 "2026-06-24T21:52:48Z")

</div>

I did downgrade to 3.9 and the error persists. I verified the older(3.9) executable is there.

I’m sorry so sound rude, but the ordinary compile options don’t work. You can not produce an epub file that actually works. It is impossible and I would challenge any one to do so. You need to look around at the market. Just google Scrivener alternatives because you need formatting tools that work. I’ve had two or three copies of Scrivener and I’m looking for alternatives because of compile. It doesn’t work.

---

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [June 24, 2026, 9:55pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/6 "2026-06-24T21:55:56Z")

</div>

I just double-checked, before posting the above, that 3.9.0.2 produces an ePub despite the warning dialogue. Are you certain no ePub is created at the target location?

As for the rest, I don’t know what you mean about “ordinary compile functions don’t work”, sorry.

---

<div class="post-metadata">

**Author:** ![Arywillis](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@Arywillis](https://forum.literatureandlatte.com/u/Arywillis)\
**Post date:** [June 24, 2026, 9:59pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/7 "2026-06-24T21:59:20Z")

</div>

I have downgraded all the way to 3.8.3 and it does create an epub but its functionally empty.

---

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [June 24, 2026, 10:07pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/8 "2026-06-24T22:07:10Z")

</div>

I would suspect some other form of configuration issue at that point, then. What kind of result do you get if you set the **Compile For** dropdown to “MultiMarkdown”, and then select “Basic Pandoc” as the format, setting up some basic section layouts?

The extra files that I mentioned above aside, that should give you a pretty good idea of what Pandoc is being fed, when viewed in a Markdown editor or regular old text editor.

---

<div class="post-metadata">

**Author:** ![Arywillis](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@Arywillis](https://forum.literatureandlatte.com/u/Arywillis)\
**Post date:** [June 24, 2026, 10:21pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/9 "2026-06-24T22:21:41Z")

</div>

I’m getting a plain text file, without any markdown

---

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [June 24, 2026, 10:23pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/10 "2026-06-24T22:23:59Z")

</div>

I unfortunately have no way to explain that; there shouldn’t even be a way of getting that result on purpose. But we might be talking about different things. Could you post a very simple sample project that demonstrates this result? I can take a look at it and see what might be going on.

---

<div class="post-metadata">

**Author:** ![Arywillis](https://forum.literatureandlatte.com/letter_avatar_proxy/v4/letter/a/85f322/32.png) [@Arywillis](https://forum.literatureandlatte.com/u/Arywillis)\
**Post date:** [June 24, 2026, 10:33pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/11 "2026-06-24T22:33:05Z")

</div>

[test [2026\_06\_24\_17\_31\_10].zip](https://forum.literatureandlatte.com/uploads/short-url/92e5iWGdlHJCp3MjPEHCy8QpiBb.zip) (310.2 KB)

I don’t think this will accomplish anything. You’ll restore this and it will work in your environment but not address the environment that I have.

---

<div class="post-metadata">

**Author:** ![AmberV](https://forum.literatureandlatte.com/user_avatar/forum.literatureandlatte.com/amberv/32/13021_2.png) [@AmberV](https://forum.literatureandlatte.com/u/AmberV)\
**Post date:** [June 24, 2026, 10:40pm UTC](https://forum.literatureandlatte.com/t/pandoc-throwing-exception-for-split-level/154120/12 "2026-06-24T22:40:50Z")

</div>

Perhaps, but perhaps not, we might as well try! 🙂 In this case, you have sent me an empty Novel template project. There is nothing in the Draft folder beyond the example starter items, and when I check compile, the Section Layouts column has not been addressed, which means the placeholder “Chapter” and “Scene” items in the draft folder are set to basically do nothing. So it is in this case, no surprise that the ePub is empty.

I do get the standard Pandoc metadata header block, so I wouldn’t necessarily call this a plain text file, but after that block, the file is of course empty.

To rectify this, I clicked `Assign Section Layouts...`, and set “Chapter Heading” to use the “Heading” layout, and “Scene” to use “Text Section”. The result is of course still not very interesting since nothing has been typed into the example “Scene” file, but I do at least now get one `# Chapter #` heading line to add some structure to the file.

So I type `This is a *test*.` into the starter “Scene” file, and this time I compile to Pandoc → ePub, sticking with the “Basic Pandoc” format, which is at this point already been set up. I get the warning, as expected, and cancel out.

I open the test.epub file in Sigil, and see the start of book. It’s not much, but it works. It has a table of contents, it has a “ch001.xhtml” file with my test line and chapter heading:

```html
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" lang="en" xml:lang="en">
<head>
  <meta charset="utf-8" />
  <meta name="generator" content="pandoc" />
  <title>ch001.xhtml</title>
  <style>
  </style>
  <link rel="stylesheet" type="text/css" href="../styles/stylesheet1.css" />
</head>
<body epub:type="bodymatter">
<section id="chapter" class="level1">
<h1>Chapter</h1>
<p>This is a <em>test</em>.</p>
</section>
</body>
</html>

```
