Comments (5)
Glad you managed to get it to work. Probably an env issue yes. Let's close this, but please reopen if you find a reproducible way of getting the bug!
from nbdev.
That is weird indeed. So this error comes because notebook2html
executes all the cells with show_doc(function_or_class)
(that are automatically added in place of exported code cells). For this to work, it adds a cell from nbdev.showdoc import show_doc
at the top of the notebook, which for some reason is failing.
My best guess would be that the environment in which nbconvert executes the notebook does not have nbdev installed, but I have no idea how to fix it.
from nbdev.
Thanks @sgugger are you able to reproduce this error? If not, that might at least start giving me hints on how to proceed.
Interestingly, I am not calling showdoc
anywhere in my notebook, but not sure that matters in this case.
I tried installing nbdev in my global environment but that didn't help.
BTW How do you generate blog posts for the main fast.ai website from Jupyter Notebooks, do you call this function this way?
from nbdev.
No I haven't been able to reproduce that bug. In ipython, your code works fine for me.
It doesn't matter if you code doesn't call show_doc
. Each time you define a function that is exported, the command notebook2html
will replace it by a show_doc cell before converting to HTML.
To generate blog posts, we use the command nbdev_nb2md
.
from nbdev.
Thanks @sgugger I was able to make this work inside a Docker container, so maybe something funky with my local environment? Should I close this issue? Thanks for the insights
from nbdev.
Related Issues (20)
- `nbdev_docs` raises `FileNotFoundError` when looking for `_proc/docs` HOT 2
- No documentation rendered for return type when function has no arguments
- No configuration options for `meta.yml` used by `nbdev_conda`, immediate fix required.
- nbdev_import HOT 2
- `proc_nbs` does not make use of its arguments `file_glob` and `file_re`
- Use of `pkg_resources` is deprecated
- Nested `lib_path` values break module -> notebook sync
- Specify multiple directories in `nbs_path` or exclude certain subdirectories HOT 3
- showdoc: SyntaxWarning: invalid escape sequence with Python 3.12
- update `ipywidgets` > 8.0.4 HOT 1
- Support Quarto Profiles
- [idea]support for deno or other languages(simple directive is enough) HOT 1
- fastai/workflows/quarto-ghp@master failing and reporting "no module named 'pandas' HOT 1
- nbdev_install_quarto doesn't work with Windows 10 system HOT 1
- Blog post broken links
- Add code folding for `exports`
- Move `exports` source after the show_doc
- Add magic `__` symbols to `show_doc` output
- Remove boxes since they broke ToC
- UnboundLocalError: cannot access local variable '_TEMPLATE' where it is not associated with a value HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nbdev.