dexplo / jupyter_to_medium

Python package for publishing Jupyter Notebooks as Medium blogposts
https://dexplo.org/jupyter_to_medium
MIT License
147 stars 14 forks source link

No template sub-directory with name 'markdown' found in the following path #75

Open batou9150 opened 1 year ago

batou9150 commented 1 year ago

I get the error below when i try to publish :

Failed to post to Medium
Returned error message below

"ValueError: No template sub-directory with name 'markdown' found in the following paths:
\t/Users/baptistepirault/Library/Jupyter
\t/Users/baptistepirault/Library/Python/3.11/share/jupyter
\t/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/share/jupyter
\t/usr/local/share/jupyter
\t/usr/share/jupyter

Traceback (most recent call last):
File \"/opt/homebrew/lib/python3.11/site-packages/traitlets/traitlets.py\", line 656, in get
value = obj._trait_values[self.name]
~~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'template_paths'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File \"/opt/homebrew/lib/python3.11/site-packages/jupyter_to_medium/_bundler.py\", line 37, in upload
data = publish(**kwargs)
^^^^^^^^^^^^^^^^^
File \"/opt/homebrew/lib/python3.11/site-packages/jupyter_to_medium/_publish_to_medium.py\", line 300, in publish
p.main()
File \"/opt/homebrew/lib/python3.11/site-packages/jupyter_to_medium/_publish_to_medium.py\", line 218, in main
self.md, self.image_data_dict = self.create_markdown()
^^^^^^^^^^^^^^^^^^^^^^
File \"/opt/homebrew/lib/python3.11/site-packages/jupyter_to_medium/_publish_to_medium.py\", line 127, in create_markdown
me = MarkdownExporter()
^^^^^^^^^^^^^^^^^^
File \"/opt/homebrew/lib/python3.11/site-packages/nbconvert/exporters/templateexporter.py\", line 348, in __init__
super().__init__(config=config, **kw)
File \"/opt/homebrew/lib/python3.11/site-packages/nbconvert/exporters/exporter.py\", line 122, in __init__
self._init_preprocessors()
File \"/opt/homebrew/lib/python3.11/site-packages/nbconvert/exporters/templateexporter.py\", line 528, in _init_preprocessors
conf = self._get_conf()
^^^^^^^^^^^^^^^^
File \"/opt/homebrew/lib/python3.11/site-packages/nbconvert/exporters/templateexporter.py\", line 546, in _get_conf
for path in map(Path, self.template_paths):
^^^^^^^^^^^^^^^^^^^
File \"/opt/homebrew/lib/python3.11/site-packages/traitlets/traitlets.py\", line 703, in __get__
return self.get(obj, cls)
^^^^^^^^^^^^^^^^^^
File \"/opt/homebrew/lib/python3.11/site-packages/traitlets/traitlets.py\", line 659, in get
default = obj.trait_defaults(self.name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \"/opt/homebrew/lib/python3.11/site-packages/traitlets/traitlets.py\", line 1872, in trait_defaults
return self._get_trait_default_generator(names[0])(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File \"/opt/homebrew/lib/python3.11/site-packages/traitlets/traitlets.py\", line 1233, in __call__
return self.func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File \"/opt/homebrew/lib/python3.11/site-packages/nbconvert/exporters/templateexporter.py\", line 557, in _template_paths
template_names = self.get_template_names()
^^^^^^^^^^^^^^^^^^^^^^^^^
File \"/opt/homebrew/lib/python3.11/site-packages/nbconvert/exporters/templateexporter.py\", line 642, in get_template_names
raise ValueError(
ValueError: No template sub-directory with name 'markdown' found in the following paths:
\t/Users/baptistepirault/Library/Jupyter
\t/Users/baptistepirault/Library/Python/3.11/share/jupyter
\t/opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/share/jupyter
\t/usr/local/share/jupyter
\t/usr/share/jupyter
"

Environment used :

someshfengde commented 1 year ago

Have exact same error