# Buggy code
def from_filename(self, filename, resources=None, **kw):
    """
    Convert a notebook from a notebook file.

    Parameters
    ----------
    filename : str
        Full filename of the notebook file to open and convert.
    """

    # Pull the metadata from the filesystem.
    if resources is None:
        resources = ResourcesDict()
    if not "metadata" in resources or resources["metadata"] == "":
        resources["metadata"] = ResourcesDict()
    basename = os.path.basename(filename)
    notebook_name = basename[: basename.rfind(".")]
    resources["metadata"]["name"] = notebook_name

    modified_date = datetime.datetime.fromtimestamp(os.path.getmtime(filename))
    resources["metadata"]["modified_date"] = modified_date.strftime("%B %-d, %Y")

    with io.open(filename) as f:
        return self.from_notebook_node(
            nbformat.read(f, "json"), resources=resources, **kw
        )


# Traceback (ValueError)
C:\Users\jorgenst\notebooks> ipython nbconvert --format=basic_html .\Simple_pylab.ipynb
Traceback (most recent call last):
File "c:\Python27\Scripts\ipython-script.py", line 8, in <module>
load_entry_point('ipython==1.0dev', 'console_scripts', 'ipython')()
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\__init__.py", line 118, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\config\application.py", line 539, in launch_instance
app.start()
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\terminal\ipapp.py", line 362, in start
return self.subapp.start()
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\nbconvert\nbconvertapp.py", line 176, in start
self.convert_notebooks()
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\nbconvert\nbconvertapp.py", line 197, in convert_notebooks
config=self.config)
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\nbconvert\exporters\export.py", line 61, in decorator
return f(*args, **kwargs)
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\nbconvert\exporters\export.py", line 214, in export_by_name
return globals()[function_name](nb, **kw)
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\nbconvert\exporters\export.py", line 61, in decorator
return f(*args, **kwargs)
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\nbconvert\exporters\export.py", line 149, in export_basic_html
return export(BasicHTMLExporter, nb, **kw)
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\nbconvert\exporters\export.py", line 61, in decorator
return f(*args, **kwargs)
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\nbconvert\exporters\export.py", line 122, in export
output, resources = exporter_instance.from_filename(nb, resources)
File "c:\python27\lib\site-packages\ipython-1.0dev-py2.7.egg\IPython\nbconvert\exporters\exporter.py", line 218, in from_filename
resources['metadata']['modified_date'] = modified_date.strftime("%B %-d, %Y")
ValueError: Invalid format string

If you suspect this is an IPython bug, please report it at:
https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
c.Application.verbose_crash=True

# Fixed code
def from_filename(self, filename, resources=None, **kw):
    """
    Convert a notebook from a notebook file.

    Parameters
    ----------
    filename : str
        Full filename of the notebook file to open and convert.
    """

    # Pull the metadata from the filesystem.
    if resources is None:
        resources = ResourcesDict()
    if not "metadata" in resources or resources["metadata"] == "":
        resources["metadata"] = ResourcesDict()
    basename = os.path.basename(filename)
    notebook_name = basename[: basename.rfind(".")]
    resources["metadata"]["name"] = notebook_name

    modified_date = datetime.datetime.fromtimestamp(os.path.getmtime(filename))
    resources["metadata"]["modified_date"] = modified_date.strftime("%B %d, %Y")

    with io.open(filename) as f:
        return self.from_notebook_node(
            nbformat.read(f, "json"), resources=resources, **kw
        )