nbdev_prepare
and nbdev_export
are throwing an error at line 90 of nbdev/maker.py
: AttributeError: 'AugAssign' object has no attribute 'targets'
.
Any idea what this issue is about? (Updating nbdev & quarto didn’t help. )
Running on Ubuntu Linux. Traceback:
$ nbdev_export
Traceback (most recent call last):
File "/fsx/shawley/envs/shazbot/bin/nbdev_prepare", line 8, in <module>
sys.exit(prepare())
File "/fsx/shawley/envs/shazbot/lib/python3.8/site-packages/fastcore/script.py", line 119, in _f
return tfunc(**merge(args, args_from_prog(func, xtra)))
File "/fsx/shawley/envs/shazbot/lib/python3.8/site-packages/nbdev/quarto.py", line 237, in prepare
nbdev_export.__wrapped__()
File "/fsx/shawley/envs/shazbot/lib/python3.8/site-packages/nbdev/doclinks.py", line 137, in nbdev_export
for f in files: nb_export(f)
File "/fsx/shawley/envs/shazbot/lib/python3.8/site-packages/nbdev/export.py", line 59, in nb_export
mm.make(cells, all_cells, lib_path=lib_path)
File "/fsx/shawley/envs/shazbot/lib/python3.8/site-packages/nbdev/maker.py", line 201, in make
_all = self.make_all(all_cells)
File "/fsx/shawley/envs/shazbot/lib/python3.8/site-packages/nbdev/maker.py", line 100, in make_all
all_assigns = assigns.filter(lambda o: getattr(_targets(o)[0],'id',None)=='_all_')
File "/fsx/shawley/envs/shazbot/lib/python3.8/site-packages/fastcore/foundation.py", line 160, in filter
return self._new(filter_ex(self, f=f, negate=negate, gen=gen, **kwargs))
File "/fsx/shawley/envs/shazbot/lib/python3.8/site-packages/fastcore/basics.py", line 642, in filter_ex
return list(res)
File "/fsx/shawley/envs/shazbot/lib/python3.8/site-packages/nbdev/maker.py", line 100, in <lambda>
all_assigns = assigns.filter(lambda o: getattr(_targets(o)[0],'id',None)=='_all_')
File "/fsx/shawley/envs/shazbot/lib/python3.8/site-packages/nbdev/maker.py", line 90, in _targets
def _targets(o): return [o.target] if isinstance(o, ast.AnnAssign) else o.targets
AttributeError: 'AugAssign' object has no attribute 'targets'
What ‘targets’ is it looking for?
The offending notebook (audio-algebra/aa-mixer-toy.ipynb at main · drscotthawley/audio-algebra · GitHub) is similar to the other ones in the repo, and executes fine on several platforms.