question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build a Standalone Page: "Path to book isn't a directory"

See original GitHub issue

I’m trying to Build a Standalone Page using a simple markdown file. (I’m keenly exploring jupyter-book for the first time so apologies if I’m off on a tangent. btw nice work!)

Steps to reproduce the behavior:

  1. create folder viz. singlepage
  2. create _config.yml
  3. create onepage.md
  4. generate _toc.yml (is this required for a single page? but same error even if omitted.)
  5. run build command jb build singlepage/onepage.md

Expected behavior As per doc - “This will execute your content and output the proper HTML in a _build/html folder.”

Error

Traceback (most recent call last):
  File "/home/spikex/miniconda3/envs/jubo/bin/jb", line 8, in <module>
    sys.exit(main())
  File "/home/spikex/miniconda3/envs/jubo/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/spikex/miniconda3/envs/jubo/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/spikex/miniconda3/envs/jubo/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/spikex/miniconda3/envs/jubo/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/spikex/miniconda3/envs/jubo/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/spikex/miniconda3/envs/jubo/lib/python3.7/site-packages/jupyter_book/commands/__init__.py", line 59, in build
    _error(f"Path to book isn't a directory: {PATH_BOOK}")
  File "/home/spikex/miniconda3/envs/jubo/lib/python3.7/site-packages/jupyter_book/utils.py", line 65, in _error
    raise kind(box)
ValueError:
===============================================================================

Path to book isn't a directory: /home/spikex/devx/jubod/singlepage/onepage.md

===============================================================================

Environment

  • Python 3.7.8
  • Package versions: Jupyter Book: 0.7.4 MyST-NB: 0.9.1 Sphinx Book Theme: 0.0.36 MyST-Parser: 0.12.2 Jupyter-Cache: 0.4.0
  • Operating System WSL2 (Ubuntu20.04) on Windows10
  • miniconda3 env

Additional context My minimal folder tree:

  • singlepage
    • _config.yml
    • _toc_yml
    • onepage.md

Building a book works as expected (using the same steps listed above) ie. jb build singlepage/

Therefore I have not attached my trivial test content and meta files - they are unlikely to be the source of the problem?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisjsewellcommented, Aug 26, 2020

perhaps the doc’s should have a associated version label?

Yeh, as I was discussing with @AakashGfude, hopefully at some point we will finalise with the readthedocs guys allowing for jupyter-book builds, then there you can have multiple version of the documentation available. As is, we only show the latest version from the master branch. I guess another temporary “solution” would be to maintain a seperate branch, from which the documentation is built, and only push to that when releasing new versions

1reaction
CodeCoxcommented, Aug 26, 2020

Yes @AakashGfude, page does work for jb-v0.7.4

I noticed the new version ie. jb-v0.7.5 (2020-08-26) has since been released. I just upgraded - and page is the cmd that works in this latest incarnation.

Is page or build the cmd that should be used going forward? Is the doc correct(build) or does it need to be updated(page)?

(Also, perhaps the doc’s should have a associated version label? This probably should be raised as another issue?)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Create your first directory - Learn the Command Line in Terminal
Use the command mkdir to create a directory. mkdir is short for "make directory." Specify the name of the directory (folder) you want...
Read more >
How to Create Pages in Next.js with Static & Dynamic Data
we want to render statically. Let's start off by creating a new directory characters inside of pages and inside, create a new file...
Read more >
1. Creating Your First Page - Creating a Website - O'Reilly
Chapter 1. Creating Your First Page Every website is a collection of web pages, so it should come as no surprise that your...
Read more >
when trying to access a site deployed on Netlify - Stack Overflow
There are two good ways to figure out why our build isn't producing an index.html in your publish folder ( public , in...
Read more >
Building a static website with Jekyll and GitHub Pages
When you search for a book on Amazon.com, for example, the search results page you are shown didn't already exist as a full...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found