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

Can't use exec_file in config file #566

Closed
jstenar opened this issue Jul 11, 2011 · 1 comment
Closed

Can't use exec_file in config file #566

jstenar opened this issue Jul 11, 2011 · 1 comment
Labels
Milestone

Comments

@jstenar
Copy link
Member

jstenar commented Jul 11, 2011

I have an empty python file called empty.py in my .ipython directory and I have enabled the following line in my default_profile/ipython_config.py:

c.TerminalIPythonApp.exec_files = ['empty.py']

When starting ipython I get the following error:

[TerminalIPythonApp] Unknown error in handling IPythonApp.exec_files:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
c:\python\external\ipython-js\IPython\core\shellapp.pyc in _exec_file(self, fname
    192         # were run from a system shell.

    193         save_argv = sys.argv
--> 194         sys.argv = sys.argv[sys.argv.index(fname):]
    195         try:
    196             if os.path.isfile(full_filename):

ValueError: list.index(x): x not in list

If I change the filename empty.py to a non-existing filename I get an unknown file error.

/Jörgen

@minrk
Copy link
Member

minrk commented Jul 11, 2011

Ah, I forgot that files could be specified not on the command-line, sorry.

Should be fixed.

@minrk minrk closed this as completed in d306e58 Jul 11, 2011
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
also don't treat IOError (file not found) as an unknown failure.

closes ipythongh-566
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants