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

Add importing of os module to a sample of ipython_config.py in readme #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dobashim
Copy link

@dobashim dobashim commented Dec 2, 2014

I got an Exception about os module when I executed ipython command according to README.
I used Anaconda's ipython on CentOS7.

2014-12-02 21:15:13.141 [NotebookApp] ERROR | Exception while loading config file /home/dobachi/.ipython/profile_spark/ipython_config.py
Traceback (most recent call last):
  File "/home/dobachi/anaconda/lib/python2.7/site-packages/IPython/config/application.py", line 514, in _load_config_files
    config = loader.load_config()
  File "/home/dobachi/anaconda/lib/python2.7/site-packages/IPython/config/loader.py", line 425, in load_config
    self._read_file_as_dict()
  File "/home/dobachi/anaconda/lib/python2.7/site-packages/IPython/config/loader.py", line 478, in _read_file_as_dict
    py3compat.execfile(conf_filename, namespace)
  File "/home/dobachi/anaconda/lib/python2.7/site-packages/IPython/utils/py3compat.py", line 224, in execfile
    builtin_mod.execfile(filename, *where)
  File "/home/dobachi/.ipython/profile_spark/ipython_config.py", line 534, in <module>
    SPARK_HOME = os.environ['SPARK_HOME']
NameError: name 'os' is not defined

I needed import os before using os.environ['SPARK_HOME'].
How about it?

@tribbloid
Copy link
Owner

You are right, but I thought all configuration files are created with this line. So I didn't include them. But its better to include it

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

Successfully merging this pull request may close these issues.

2 participants