Giter Club home page Giter Club logo

Comments (5)

sgugger avatar sgugger commented on May 17, 2024 1

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.

sgugger avatar sgugger commented on May 17, 2024

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.

hamelsmu avatar hamelsmu commented on May 17, 2024

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.

sgugger avatar sgugger commented on May 17, 2024

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.

hamelsmu avatar hamelsmu commented on May 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.