Skip to content

Can't use exec_file in config file #566

@jstenar

Description

@jstenar

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions