Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
batou9150 opened this issue Jun 9, 2023 · 1 comment

Comments

@batou9150
Copy link

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/[email protected]/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/[email protected]/Frameworks/Python.framework/Versions/3.11/share/jupyter
\t/usr/local/share/jupyter
\t/usr/share/jupyter
"

Environment used :

  • mac os monterey
  • python 3.11
  • jupyter 6.5.2
  • jupyter-to-medium 0.2.4
@someshfengde
Copy link

Have exact same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants