Closed alain2208 closed 4 years ago
think i found it it's because i'm using 3.5 and i have to convert f'' by fstring() in jupyter_required/core.py
also had another issue in the same file required: list = required if isinstance(required, list) else list(required.keys()) need to remove the :list to make it work.
but still the same issue of fstring when doing the import from jupyter_datatables import init_datatables_mode
so forget it I will need to upgradde my python i think nice job BTW
Describe the bug when executing the jupyter nbextension install --sys-prefix -py_ jupyter_require got an invalid
To Reproduce just execute the comand in command line
Expected behavior A clear and concise description of what you expected to happen.
text copy C:\Users\xyz>jupyter nbextension install --sys-prefix --py jupyter_require Traceback (most recent call last): File "c:\anaconda3\lib\runpy.py", line 184, in _run_module_as_main "main", mod_spec) File "c:\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Anaconda3\Scripts\jupyter-nbextension.EXE__main.py", line 9, in
File "c:\anaconda3\lib\site-packages\jupyter_core\application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, kwargs)
File "c:\anaconda3\lib\site-packages\traitlets\config\application.py", line 658, in launch_instance
app.start()
File "c:\anaconda3\lib\site-packages\notebook\nbextensions.py", line 988, in start
super(NBExtensionApp, self).start()
File "c:\anaconda3\lib\site-packages\jupyter_core\application.py", line 255, in start
self.subapp.start()
File "c:\anaconda3\lib\site-packages\notebook\nbextensions.py", line 716, in start
self.install_extensions()
File "c:\anaconda3\lib\site-packages\notebook\nbextensions.py", line 695, in install_extensions
kwargs
File "c:\anaconda3\lib\site-packages\notebook\nbextensions.py", line 211, in install_nbextension_python
m, nbexts = _get_nbextension_metadata(module)
File "c:\anaconda3\lib\site-packages\notebook\nbextensions.py", line 1122, in _get_nbextension_metadata
m = import_item(module)
File "c:\anaconda3\lib\site-packages\traitlets\utils\importstring.py", line 42, in import_item
return import(parts[0])
File "c:\anaconda3\lib\site-packages\jupyter_require\ init__.py", line 34, in
from .notebook import link_css
File "c:\anaconda3\lib\site-packages\jupyter_require\notebook.py", line 30, in
from .core import execute_with_requirements
File "c:\anaconda3\lib\site-packages\jupyter_require\core.py", line 178
comm_id=f'config.JupyterRequire#{datetime.timestamp(now)}',
^
SyntaxError: invalid syntax
Desktop (please complete the following information):
Additional context if i try to continue the other steps and using the function in jupyter notebook got alos an error Traceback (most recent call last):
File "c:\anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 3267, in run_code exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 4, in
from jupyter_datatables import init_datatables_mode
File "c:\anaconda3\lib\site-packages\jupyter_datatables__init__.py", line 202 f"Sample size cannot be larger than length of the table: {sample_size} > {len(df)}" ^ SyntaxError: invalid syntax