Skip to content

Commit 2d60917

Browse files
committed
fix #1298
1 parent f896e92 commit 2d60917

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

nbdev/frontmatter.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,10 @@ def cell(self, cell):
6363
def end(self):
6464
self.nb.frontmatter_ = self.fm
6565
if not self.fm: return
66+
if not hasattr(self.nb, 'path_'):
67+
raise AttributeError('Notebook missing `path_` attribute.\n\nPlease remove any nbdev-related notebook filters '
68+
'from your _quarto.yml file (e.g. `ipynb-filter: [nbdev_filter]`), since they are no '
69+
'longer supported as of nbdev v2.3. See the v2.3 launch post for more information: '
70+
'https://forums.fast.ai/t/upcoming-changes-in-v2-3-edit-now-released/98905.')
6671
self.fm.update({'output-file': _nbpath2html(Path(self.nb.path_)).name})
6772
_insertfm(self.nb, self.fm)

nbs/api/09_frontmatter.ipynb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@
126126
" def end(self):\n",
127127
" self.nb.frontmatter_ = self.fm\n",
128128
" if not self.fm: return\n",
129+
" if not hasattr(self.nb, 'path_'):\n",
130+
" raise AttributeError('Notebook missing `path_` attribute.\\n\\nPlease remove any nbdev-related notebook filters '\n",
131+
" 'from your _quarto.yml file (e.g. `ipynb-filter: [nbdev_filter]`), since they are no '\n",
132+
" 'longer supported as of nbdev v2.3. See the v2.3 launch post for more information: '\n",
133+
" 'https://forums.fast.ai/t/upcoming-changes-in-v2-3-edit-now-released/98905.')\n",
129134
" self.fm.update({'output-file': _nbpath2html(Path(self.nb.path_)).name})\n",
130135
" _insertfm(self.nb, self.fm)"
131136
]

0 commit comments

Comments
 (0)