Thanks to visit codestin.com
Credit goes to github.com

Skip to content

nbformat 5.0.0 missing schema files #16127

Closed
@Kojoley

Description

@Kojoley

jupyter/nbformat#155

================================== FAILURES ===================================
_________________________________ test_ipynb __________________________________
[gw0] win32 -- Python 3.6.7 c:\miniconda36-x64\envs\test-environment\python.exe
    def test_ipynb():
        nb_path = Path(__file__).parent / 'test_nbagg_01.ipynb'
    
        with TemporaryDirectory() as tmpdir:
            out_path = Path(tmpdir, "out.ipynb")
            subprocess.check_call(
                ["jupyter", "nbconvert", "--to", "notebook",
                 "--execute", "--ExecutePreprocessor.timeout=500",
                 "--output", str(out_path), str(nb_path)],
>               env={**os.environ, "IPYTHONDIR": tmpdir})
lib\matplotlib\tests\test_backend_nbagg.py:22: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = (['jupyter', 'nbconvert', '--to', 'notebook', '--execute', '--ExecutePreprocessor.timeout=500', ...],)
kwargs = {'env': {'7ZIP': '"C:\\Program Files\\7-Zip\\7z.exe"', 'ALLUSERSPROFILE': 'C:\\ProgramData', 'APPDATA': 'C:\\Users\\appveyor\\AppData\\Roaming', 'APPVEYOR': 'True', ...}}
retcode = 1
cmd = ['jupyter', 'nbconvert', '--to', 'notebook', '--execute', '--ExecutePreprocessor.timeout=500', ...]
    def check_call(*popenargs, **kwargs):
        """Run command with arguments.  Wait for command to complete.  If
        the exit code was zero then return, otherwise raise
        CalledProcessError.  The CalledProcessError object will have the
        return code in the returncode attribute.
    
        The arguments are the same as for the call function.  Example:
    
        check_call(["ls", "-l"])
        """
        retcode = call(*popenargs, **kwargs)
        if retcode:
            cmd = kwargs.get("args")
            if cmd is None:
                cmd = popenargs[0]
>           raise CalledProcessError(retcode, cmd)
E           subprocess.CalledProcessError: Command '['jupyter', 'nbconvert', '--to', 'notebook', '--execute', '--ExecutePreprocessor.timeout=500', '--output', 'C:\\Users\\appveyor\\AppData\\Local\\Temp\\1\\tmpuy5gn1km\\out.ipynb', 'C:\\projects\\matplotlib\\lib\\matplotlib\\tests\\test_nbagg_01.ipynb']' returned non-zero exit status 1.
c:\miniconda36-x64\envs\test-environment\lib\subprocess.py:291: CalledProcessError
---------------------------- Captured stderr call -----------------------------
[NbConvertApp] Converting notebook C:\projects\matplotlib\lib\matplotlib\tests\test_nbagg_01.ipynb to notebook
Traceback (most recent call last):
  File "c:\miniconda36-x64\envs\test-environment\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "c:\miniconda36-x64\envs\test-environment\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Miniconda36-x64\envs\test-environment\Scripts\jupyter-nbconvert.EXE\__main__.py", line 7, in <module>
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\jupyter_core\application.py", line 268, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\traitlets\config\application.py", line 664, in launch_instance
    app.start()
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbconvert\nbconvertapp.py", line 340, in start
    self.convert_notebooks()
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbconvert\nbconvertapp.py", line 510, in convert_notebooks
    self.convert_single_notebook(notebook_filename)
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbconvert\nbconvertapp.py", line 481, in convert_single_notebook
    output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbconvert\nbconvertapp.py", line 410, in export_single_notebook
    output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbconvert\exporters\exporter.py", line 179, in from_filename
    return self.from_file(f, resources=resources, **kw)
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbconvert\exporters\exporter.py", line 197, in from_file
    return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbformat\__init__.py", line 140, in read
    return reads(fp.read(), as_version, **kwargs)
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbformat\__init__.py", line 77, in reads
    validate(nb)
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbformat\validator.py", line 276, in validate
    relax_add_props=relax_add_props):
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbformat\validator.py", line 298, in iter_validate
    validator = get_validator(version, version_minor, relax_add_props=relax_add_props)
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbformat\validator.py", line 69, in get_validator
    schema_json = _get_schema_json(v, version=version, version_minor=version_minor)
  File "c:\miniconda36-x64\envs\test-environment\lib\site-packages\nbformat\validator.py", line 106, in _get_schema_json
    with open(schema_path) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'c:\\miniconda36-x64\\envs\\test-environment\\lib\\site-packages\\nbformat\\v4\\nbformat.v4.2.schema.json'

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions