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

Installation Error: "NameError: name 'CoreConfig' is not defined" #19

Closed
skyler14 opened this issue Sep 19, 2019 · 8 comments
Closed

Installation Error: "NameError: name 'CoreConfig' is not defined" #19

skyler14 opened this issue Sep 19, 2019 · 8 comments
Labels
bug Something isn't working question Further information is requested

Comments

@skyler14
Copy link

System: Ubuntu 16.04
When I run the installation
jupyter labextension install jupyterlab-spreadsheet
in my Python 3.5.2 virtualenv I get the error:

An error occured. NameError: name 'CoreConfig' is not defined See the log file for details: /tmp/jupyterlab-debug-05zbv00j.log

The log in that location outputs

Traceback (most recent call last):

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/commands.py", line 1657, in _node_check
output = subprocess.check_output([node, 'node-version-check.js'], cwd=HERE)

File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
**kwargs).stdout

File "/usr/lib/python3.5/subprocess.py", line 708, in run
output=stdout, stderr=stderr)

subprocess.CalledProcessError: Command '['/usr/bin/nodejs', 'node-version-check.js']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
yield

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 93, in start
ans = self.run_task()

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 147, in run_task
for i, arg in enumerate(self.extra_args)

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 147, in
for i, arg in enumerate(self.extra_args)

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/commands.py", line 319, in install_extension
_node_check(logger)

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/commands.py", line 1660, in _node_check
data = CoreConfig()._data

NameError: name 'CoreConfig' is not defined

Exiting application: jupyter

@quigleyj97
Copy link
Owner

Hmm... This kinda smells like a deployment issue, but I'm not sure. Can you give the output of the following commands?

jupyter troubleshoot

jupyter labextension list

That'll narrow it down a bit

@quigleyj97 quigleyj97 added bug Something isn't working question Further information is requested labels Sep 20, 2019
@Freedomisgood
Copy link

System: Ubuntu 16.04
When I run the installation
jupyter labextension install jupyterlab-spreadsheet
in my Python 3.5.2 virtualenv I get the error:

An error occured. NameError: name 'CoreConfig' is not defined See the log file for details: /tmp/jupyterlab-debug-05zbv00j.log

The log in that location outputs

Traceback (most recent call last):

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/commands.py", line 1657, in _node_check
output = subprocess.check_output([node, 'node-version-check.js'], cwd=HERE)

File "/usr/lib/python3.5/subprocess.py", line 626, in check_output
**kwargs).stdout

File "/usr/lib/python3.5/subprocess.py", line 708, in run
output=stdout, stderr=stderr)

subprocess.CalledProcessError: Command '['/usr/bin/nodejs', 'node-version-check.js']' returned non-zero exit status 1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
yield

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 93, in start
ans = self.run_task()

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 147, in run_task
for i, arg in enumerate(self.extra_args)

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/labextensions.py", line 147, in
for i, arg in enumerate(self.extra_args)

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/commands.py", line 319, in install_extension
_node_check(logger)

File "/home/skyler/Documents/NN/tf/lib/python3.5/site-packages/jupyterlab/commands.py", line 1660, in _node_check
data = CoreConfig()._data

NameError: name 'CoreConfig' is not defined

Exiting application: jupyter

Actually, I aslo met with this problem just now. The same log is given when I printed jupyter labextension install @jupyterlab/github or jupyter lab build
ubuntu 16.04 , python3.5

@Freedomisgood
Copy link

$ jupyter troubleshoot

$PATH:
	/home/apollo3d/bin
	/home/apollo3d/.local/bin
	/usr/local/sbin
	/usr/local/bin
	/usr/sbin
	/usr/bin
	/sbin
	/bin
	/usr/games
	/usr/local/games
	/snap/bin
	/home/apollo3d/bin

sys.path:
	/home/apollo3d/.local/bin
	/usr/lib/python35.zip
	/usr/lib/python3.5
	/usr/lib/python3.5/plat-x86_64-linux-gnu
	/usr/lib/python3.5/lib-dynload
	/home/apollo3d/.local/lib/python3.5/site-packages
	/usr/local/lib/python3.5/dist-packages
	/usr/lib/python3/dist-packages

sys.executable:
	/usr/bin/python3

sys.version:
	3.5.2 (default, Jul 10 2019, 11:58:48) 
	[GCC 5.4.0 20160609]

platform.platform():
	Linux-4.15.0-47-generic-x86_64-with-Ubuntu-16.04-xenial

which -a jupyter:
	/home/apollo3d/.local/bin/jupyter

pip list:
	Package                       Version               
	----------------------------- ----------------------
	apturl                        0.5.2                 
	attrs                         19.1.0                
	backcall                      0.1.0                 
	beautifulsoup4                4.4.1                 
	bleach                        3.1.0                 
	blinker                       1.3                   
	Brlapi                        0.6.4                 
	catfish                       1.4.2                 
	chardet                       2.3.0                 
	checkbox-support              0.22                  
	command-not-found             0.3                   
	cryptography                  1.2.3                 
	cycler                        0.10.0                
	decorator                     4.4.0                 
	defer                         1.0.6                 
	defusedxml                    0.6.0                 
	entrypoints                   0.3                   
	feedparser                    5.1.3                 
	guacamole                     0.9.2                 
	html5lib                      0.999                 
	httplib2                      0.9.1                 
	idna                          2.0                   
	ipykernel                     5.1.2                 
	ipython                       7.8.0                 
	ipython-genutils              0.2.0                 
	ipywidgets                    7.5.1                 
	jedi                          0.15.1                
	Jinja2                        2.10.1                
	json5                         0.8.5                 
	jsonschema                    3.0.2                 
	jupyter                       1.0.0                 
	jupyter-client                5.3.3                 
	jupyter-console               6.0.0                 
	jupyter-core                  4.5.0                 
	jupyterlab                    1.1.4                 
	jupyterlab-server             1.0.6                 
	kiwisolver                    1.0.1                 
	language-selector             0.1                   
	lightdm-gtk-greeter-settings  1.2.1                 
	louis                         2.6.4                 
	lxml                          3.5.0                 
	Mako                          1.0.3                 
	MarkupSafe                    1.1.1                 
	matplotlib                    3.0.2                 
	menulibre                     2.1.3                 
	mistune                       0.8.4                 
	mugshot                       0.3.1                 
	nbconvert                     5.6.0                 
	nbformat                      4.4.0                 
	notebook                      6.0.1                 
	numpy                         1.15.4                
	oauthlib                      1.0.3                 
	onboard                       1.2.0                 
	padme                         1.1.1                 
	pandocfilters                 1.4.2                 
	parso                         0.5.1                 
	passlib                       1.7.1                 
	pexpect                       4.7.0                 
	pickleshare                   0.7.5                 
	Pillow                        3.1.2                 
	pip                           19.2.3                
	plainbox                      0.25                  
	prometheus-client             0.7.1                 
	prompt-toolkit                2.0.9                 
	psutil                        3.4.2                 
	ptyprocess                    0.6.0                 
	pyasn1                        0.1.9                 
	pycups                        1.9.73                
	pycurl                        7.43.0                
	Pygments                      2.4.2                 
	pygobject                     3.20.0                
	PyJWT                         1.3.0                 
	pyparsing                     2.0.3                 
	pyrsistent                    0.15.4                
	python-apt                    1.1.0b1+ubuntu0.16.4.5
	python-dateutil               2.8.0                 
	python-debian                 0.1.27                
	python-systemd                231                   
	pyxdg                         0.25                  
	pyzmq                         18.1.0                
	qtconsole                     4.5.5                 
	reportlab                     3.3.0                 
	requests                      2.9.1                 
	screen-resolution-extra       0.0.0                 
	Send2Trash                    1.5.0                 
	sessioninstaller              0.0.0                 
	setuptools                    41.2.0                
	six                           1.12.0                
	ssh-import-id                 5.5                   
	system-service                0.3                   
	terminado                     0.8.2                 
	testpath                      0.4.2                 
	tornado                       6.0.3                 
	traitlets                     4.3.2                 
	ubuntu-drivers-common         0.0.0                 
	ufw                           0.35                  
	unattended-upgrades           0.1                   
	unity-scope-calculator        0.1                   
	unity-scope-chromiumbookmarks 0.1                   
	unity-scope-colourlovers      0.1                   
	unity-scope-devhelp           0.1                   
	unity-scope-firefoxbookmarks  0.1                   
	unity-scope-gdrive            0.7                   
	unity-scope-manpages          0.1                   
	unity-scope-openclipart       0.1                   
	unity-scope-texdoc            0.1                   
	unity-scope-tomboy            0.1                   
	unity-scope-virtualbox        0.1                   
	unity-scope-yelp              0.1                   
	unity-scope-zotero            0.1                   
	urllib3                       1.13.1                
	usb-creator                   0.3.0                 
	virtualenv                    15.0.1                
	wcwidth                       0.1.7                 
	webencodings                  0.5.1                 
	wheel                         0.29.0                
	widgetsnbextension            3.5.1                 
	xdiagnose                     3.8.4.1               
	xkit                          0.0.0                 
	XlsxWriter                    0.7.3

I dont install any extension.

@quigleyj97
Copy link
Owner

I think this is related to jupyterlab/jupyterlab#7211. @Freedomisgood, given that you've run into this installing other extensions as well, I'm inclined to believe this is towards JupyterLab core. I'll investigate some more tomorrow, and see what's up.

@Freedomisgood
Copy link

Solved!
That's because the version of nodejs is low..My version is v4.2.6, I thought I install the newest, but that's not true, everything is ok when i upgrade to v10.16.3

@quigleyj97
Copy link
Owner

Awesome! Looking over the logs again I can see why that's the case:

subprocess.CalledProcessError: Command '['/usr/bin/nodejs', 'node-version-check.js']' returned non-zero exit status 1

Probably means the version check is using a feature not available on Node 4 (causing it to break). I'll close this for now, but @skyler14 feel free to reopen if this doesn't fix your issue.

@AlllenChi
Copy link

Solved!
That's because the version of nodejs is low..My version is v4.2.6, I thought I install the newest, but that's not true, everything is ok when i upgrade to v10.16.3

well, I've just met the same problem with you, but I didn't solve it after upgrade the nodejs. My nodejs version is v8.10.0.

@ConanCui
Copy link

Hi you can update your nodejs to solve this problem by this simple code
conda install -c conda-forge nodejs
this code is from the official jupyter lab document. https://jupyterlab.readthedocs.io/en/stable/user/extensions.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants