Error when calling a jupyter notebook file from matlab

7 visualizaciones (últimos 30 días)
Rachel Dawn
Rachel Dawn el 12 de Nov. de 2020
Respondida: Jeff Miller el 13 de Nov. de 2020
So, I'm trying to run a jupyter notebook file from a matlab script:
status = system("runipy K-meansCBeam.ipynb")
*runipy is some program that runs jupyter files from the command terminal. I've tried typing in "runipy K-meansCBeam.ipynb" into the command terminal and it does run that jupyter file. But, not sure how to do this from a matlab script.
This is the error I get:
Traceback (most recent call last):
File "c:\users\user\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\user\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\User\anaconda3\Scripts\runipy.exe\__main__.py", line 7, in <module>
File "c:\users\user\anaconda3\lib\site-packages\runipy\main.py", line 132, in main
with open(args.input_file) as input_file:
FileNotFoundError: [Errno 2] No such file or directory: 'K-meansCBeam.ipynb'
status =
1

Respuestas (1)

Jeff Miller
Jeff Miller el 13 de Nov. de 2020
Just guessing here, but given that it is a file not found error, maybe you need to specify the path to the input file, something like:
status = system("runipy C:\MyPythonStuff\K-meansCBeam.ipynb")

Categorías

Más información sobre Integration with Online Platforms en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by