Skip to content

Latest commit

 

History

History
72 lines (57 loc) · 2.73 KB

File metadata and controls

72 lines (57 loc) · 2.73 KB

Notebook Widget Metadata Fix Report

Summary

Fixed widget metadata issues in Jupyter notebooks that were causing nbconvert errors during GitHub Actions workflows.

Problem

Notebooks contained a "widgets" metadata section with the structure:

"widgets": {
  "state": {},
  "version": "1.1.2"
}

This caused nbconvert to fail with the error:

KeyError: 'application/vnd.jupyter.widget-state+json'

The error occurred because nbconvert expected the widgets state to contain a specific MIME type key that was missing.

Solution

Removed the entire "widgets" metadata section from all affected notebooks since it was empty and not needed.

Fixed Notebooks (23 total)

Visualization (5 notebooks)

  • ✅ Visualization/Geospatial-Visualization-with-Folium-and-Pandas.ipynb
  • ✅ Visualization/Matplotlib-Line-Plots-and-Canadian-Immigration-Exploration.ipynb
  • ✅ Visualization/Pie-Charts-Box-Plots-Scatter-Plots-and-Bubble-Plots-py-v2.0.ipynb
  • ✅ Visualization/Waffle-WordCloud-Regression-Visualization-Project.ipynb

SQL (7 notebooks)

  • ✅ SQL/Sayem_ChicagoData_Analysis.ipynb
  • ✅ SQL/Sayem_ChicagoSchools_SQLPractice.ipynb
  • ✅ SQL/Sayem_PeerAssignment.ipynb
  • ✅ SQL/Sayem_RealWorldData_SQL.ipynb
  • ✅ SQL/Sayem_SQL_Analysis.ipynb
  • ✅ SQL/Sayem_SQL_Connecting.ipynb
  • ✅ SQL/Sayem_SQL_Querying.ipynb

Machine Learning (8 notebooks)

  • ✅ ML/Classification/Decision-Trees-Topic-Based.ipynb
  • ✅ ML/Classification/Logistic-Regression-Topic-Based.ipynb
  • ✅ ML/Clustering/DBSCAN-Clustering-Topic-Based.ipynb
  • ✅ ML/Clustering/K-Means-Clustering-Topic-Based.ipynb
  • ✅ ML/Recommender Systems/Collaborative-Filtering-Recommender-Topic-Based.ipynb
  • ✅ ML/Recommender Systems/Content-Based-Recommender-Topic-Based.ipynb
  • ✅ ML/Regression/Multiple-Linear-Regression-Topic-Based.ipynb
  • ✅ ML/Regression/Polynomial-Regression-Topic-Based.ipynb
  • ✅ ML/Regression/Simple-Linear-Regression-Topic-Based.ipynb

Data Analysis (1 notebook)

  • ✅ Data_Analysis/king-county-house-sales-analysis.ipynb

NLP (1 notebook)

  • ✅ NLP/Utils_and_Resources/Lab/Files/tf/C4W3_HF_Lab1_QA_BERT.ipynb

Checkpoint Files (1 notebook)

  • ✅ NLP/Utils_and_Resources/Lab/Files/tf/.ipynb_checkpoints/C4W3_HF_Lab1_QA_BERT-checkpoint.ipynb

Verification

  • ✅ All notebooks now have valid JSON structure
  • ✅ Test conversions to HTML are successful
  • ✅ No more widget metadata found in any notebooks
  • ✅ GitHub Actions workflow should now complete without widget-related errors

Files Created

  • fix_notebook_widgets.py - Python script used to fix all notebooks automatically

Next Steps

The GitHub Actions workflow should now run successfully without the widget metadata errors. All 23 notebooks can be converted to HTML format without issues.