Skip to content

'Unable to render code block' error #16

Closed

Description

@lllobs-wq

When trying to access preview for chapter 7 and 8 solutions I get this error. Looks like all other chapters work.

Activity

  1. AllenDowney commented on Oct 14, 2026

    @AllenDowney
    Owner

    When you say "trying to access preview", what environment are you in, what are you doing, and where is that error appearing?

    See: https://www.geeksforgeeks.org/software-testing/how-to-write-a-good-bug-report/

  2. lllobs-wq commented on Oct 14, 2026

    @lllobs-wq
    Author

    Hi, thank you for your reply.

    I am only in browser, Google Chrome on a ChromeOS Chromebook.

    I mean I can't actually access Chapter 7 or 8 solutions either on GitHub or through colab. Here are the links I am trying to access

    https://github.com/AllenDowney/ThinkPythonSolutions/blob/v3/soln/chap07.ipynb
    https://github.com/AllenDowney/ThinkPythonSolutions/blob/v3/soln/chap08.ipynb

    ^ This is where I get 'Unable to render code block' error

    https://colab.research.google.com/github/AllenDowney/ThinkPythonSolutions/blob/v3/soln/chap07.ipynb

    ^ Actually I can access Chapter 8 solutions through here, but not Chapter 7. It APPEARS to load but the page is frozen.

    Images attached

    Image Image

    ^ Chapter 8

    Image

    ^ Chapter 7

    I hope this clarifies things. Thanks. I am not familiar with these things.

  3. AllenDowney commented on Oct 14, 2026

    @AllenDowney
    Owner

    That's great -- thanks for the detailed information!

    So far I am unable to replicate. When I load those two links to the GitHub preview, it seems to work.

    And when I run the chapter 7 notebook on Colab, it runs without errors.

    Image

    Same with Chapter 8.

    I can't think of any reason it should work for me on Colab and not for you!

    @claude Do you have any explanation?

  4. AllenDowney commented on Oct 14, 2026

    @AllenDowney
    Owner

    Thanks for the detailed report — this was a real bug, and your Chromebook is what exposed it.

    chap07.ipynb was 2.2 MB, and 97% of that was one hidden cell output: the entire word list, 113,783 lines, which no reader is ever shown. GitHub and Colab both render notebooks in the browser, so that loads fine on a big desktop and chokes on a smaller machine — which is why I couldn't reproduce it.

    Both chapters are much smaller now (chap07 2.2 MB → 55 KB, chap08 435 KB → 66 KB). Please give those links another try and let me know if anything is still stuck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions