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

The package is broken because of nbconvert 6.0.0a0 #37

Open
sancau opened this issue Feb 8, 2020 · 2 comments
Open

The package is broken because of nbconvert 6.0.0a0 #37

sancau opened this issue Feb 8, 2020 · 2 comments

Comments

@sancau
Copy link

sancau commented Feb 8, 2020

The package is broken due to nbconvert>=5.3 in the setup.py

Nbconflux doesn't work with nbconvert 6.0.0a0

@sancau sancau changed the title PyPi package is broken because of nbconvert 6.0.0a0 The package is broken because of nbconvert 6.0.0a0 Feb 8, 2020
@makammoun
Copy link

makammoun commented May 24, 2021

This is my attempt to fix the problem criteo-forks#2

@danizen
Copy link
Contributor

danizen commented Jun 25, 2021

@makammoun, I tried your patch by installing directly from your fork, but it didn't work for me. It certainly improved the result, because it was a runtime error with templates rather than a class hierarchy issue. This is what I got:

(dataviz) NLM01991848OCCS:serials-alma davisda4$ nbconflux test_scripts/API-Comparison.ipynb https://wiki.nlm.nih.gov/confluence/pages/editpage.action?pageId=220366732
Confluence username (davisda4): 
Confluence password: 
Traceback (most recent call last):
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/traitlets/traitlets.py", line 535, 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 "/Users/davisda4/envs/dataviz/bin/nbconflux", line 8, in <module>
    sys.exit(main())
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/nbconflux/cli.py", line 55, in main
    notebook_to_page(args.notebook, args.url, username, password,
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/nbconflux/api.py", line 60, in notebook_to_page
    exporter = ConfluenceExporter(c)
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/nbconflux/exporter.py", line 99, in __init__
    super(ConfluenceExporter, self).__init__(config=config, **kwargs)
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 325, in __init__
    super().__init__(config=config, **kw)
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/nbconvert/exporters/exporter.py", line 114, in __init__
    self._init_preprocessors()
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 491, in _init_preprocessors
    conf = self._get_conf()
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/nbconvert/exporters/templateexporter.py", line 507, in _get_conf
    for path in map(Path, self.template_paths):
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/nbconflux/exporter.py", line 91, in template_paths
    return super().template_paths + [os.path.join(os.path.abspath(os.path.dirname(__file__)), 'templates')]
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/traitlets/traitlets.py", line 575, in __get__
    return self.get(obj, cls)
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/traitlets/traitlets.py", line 538, in get
    default = obj.trait_defaults(self.name)
  File "/Users/davisda4/envs/dataviz/lib/python3.8/site-packages/traitlets/traitlets.py", line 1574, in trait_defaults
    raise TraitError("'%s' is not a trait of '%s' "
traitlets.traitlets.TraitError: 'template_paths' is not a trait of 'ConfluenceExporter' instances

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