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

Error installing on Mac OS #26

Open
vivienneprince opened this issue Feb 11, 2021 · 3 comments
Open

Error installing on Mac OS #26

vivienneprince opened this issue Feb 11, 2021 · 3 comments

Comments

@vivienneprince
Copy link

This looks like such a great template and I really want to use it! However I am running into an issue when I try to install it.

$ python -m nb_pdf_template.install

  File "nb_pdf_template/__init__.py", line 1, in <module>
    from .jupyter_python import Jupyter_PythonStyle
  File "nb_pdf_template/jupyter_python.py", line 1, in <module>
    from pygments.style import Style
  File "pygments/style.py", line 171
    class Style(metaclass=StyleMeta):
                           ^
  SyntaxError: invalid syntax

I manually installed as well, but am running into an error when trying to convert to PDF using the classic theme: (is this just a nbconvert issue?)

  $ jupyter nbconvert HW2_VBRF.ipynb --to pdf --template classic
  
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/nbconvert/exporters/templateexporter.py", line 608, in get_template_names
  raise ValueError('Unsupported mimetype %r for template %r, mimetypes supported are: \n\t%s' %\
  ValueError: Unsupported mimetype 'application/pdf' for template 'classic', mimetypes supported are: 
  text/html

However nbconvert runs with classic theme if I convert to HTML instead of PDF. The styling does not look right in the HTML format of course

  $ jupyter nbconvert HW2_VBRF.ipynb --to html --template classic
  
  [NbConvertApp] Converting notebook HW2_VBRF.ipynb to html
  [NbConvertApp] Writing 272518 bytes to HW2_VBRF.html
@vivienneprince
Copy link
Author

I ended up creating a template based off of yours so that is working for me now ^_^

I still don't know what happened with this part though in case you wanted to check it out:

$ python -m nb_pdf_template.install

  File "nb_pdf_template/__init__.py", line 1, in <module>
    from .jupyter_python import Jupyter_PythonStyle
  File "nb_pdf_template/jupyter_python.py", line 1, in <module>
    from pygments.style import Style
        File "pygments/style.py", line 171
          class Style(metaclass=StyleMeta):
                                 ^
        SyntaxError: invalid syntax

@bradleygrant
Copy link

Wanted to update, I am having similar issues:

  File "/home/venv/lib/python3.8/site-packages/traitlets/traitlets.py", line 975, in __call__
    return self.func(*args, **kwargs)
  File "/home/venv/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 526, in _template_paths
    template_names = self.get_template_names()
  File "/home/venv/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 616, in get_template_names
    raise ValueError('Unsupported mimetype %r for template %r, mimetypes supported are: \n\t%s' %\ 
  ValueError: Unsupported mimetype 'application/pdf' for template 'classic', mimetypes supported are:                             
          text/html  

@EdoWhite
Copy link

I got the 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

3 participants