I had installed all the packages in my environment, such as fire etc. What is the .stem method here? It seems to me that fname is a str which does not has method stem. Correct me if I am wrong.
Stem on a filename is the filename without the extension.
E.g. the stem of filename1.txt would be filename1
For more info Google ‘python stem filename’
So there is perhaps something wrong with the filename assignment.
This is normally the export at the end of the notebook
!python notebook2script.py 07_batchnorm.ipynb
which creates Converted 07_batchnorm.ipynb to exp/nb_07.py
which you import as #export
from exp.nb_07 import *
stem should return the file name without suffix so ```
00_exports.ipynb becomes 00_exports