Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Github says notebook is invalid. Works on Notebooks #55

Open
Zach227 opened this issue Jul 19, 2023 · 1 comment
Open

Github says notebook is invalid. Works on Notebooks #55

Zach227 opened this issue Jul 19, 2023 · 1 comment

Comments

@Zach227
Copy link
Collaborator

Zach227 commented Jul 19, 2023

Simulation Tutorial

Github states that the notebook is invalid. Though the link we have still opens the notebook just fine with Google Colabs. What causes this discrepancy?

@Zach227 Zach227 changed the title Github says Notebook is invalid. Works on Notebooks Github says notebook is invalid. Works on Notebooks Jul 19, 2023
@Zach227
Copy link
Collaborator Author

Zach227 commented Aug 8, 2023

Some cells in the notebook have duplicated information. For example:

Bad Cell Good Cell
    {
      "cell_type": "code",
      "execution_count": 4,
      "metadata": {
        "cellView": "form",
        "id": "DX4MhsQZuZ1k"
      },
      "outputs": [],
      "source": [
        "#@title Install Verilator\n",
        "!apt-get install verilator >/dev/null"
      ],
      "metadata": {
        "id": "DX4MhsQZuZ1k",
        "cellView": "form"
      },
      "execution_count": 5,
      "outputs": []
    },
    {
      "cell_type": "code",
      "execution_count": 4,
      "metadata": {
        "cellView": "form",
        "id": "DX4MhsQZuZ1k"
      },
      "outputs": [],
      "source": [
        "#@title Install Verilator\n",
        "!apt-get install verilator >/dev/null"
      ]
    },

When VS Code or Github tries to render this they get confused and says it is invalid. But when the notebook is loaded into Google Colabs it clears the duplicate data and the notebook works properly. This must have happened when somebody ran the notebook and then downloaded the .ipynb file without clearing everything first. To fix this open the notebook in Google Colabs and then save a copy to your drive. Open the copied notebook and make sure all outputs are cleared, code is covered by forms, and sections are collapsed. Then download the notebook as .ipynb without running anything in the notebook. Replace the bugged version with your newly download version commit to github.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant