Skip to content

ipython crashes with TypeError for ipython 3.1.0 with python3.5 and pyreadline #8316

Closed

Description

@waynew

I'm running Windows 7 with whatever the current set of patches are, Python3.5 rc2, and just did a pip install of ipython 3.1.0.

Came without colors, and said that for color support I need to install pyreadline on Windows. So I did. An then it crashed with:

Traceback (most recent call last):
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\Scripts\ipython.exe\__main__.py", line 9, in <module>
    sys.exit(start_ipython())
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\IPython\__init__.py", line 120, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\IPython\config\application.py", line 573, in launch_instance
    app.initialize(argv)
  File "<string>", line 2, in initialize
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\IPython\config\application.py", line 75, in catch_config_error
    return method(app, *args, **kwargs)
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\IPython\terminal\ipapp.py", line 332, in initialize
    self.init_shell()
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\IPython\terminal\ipapp.py", line 348, in init_shell
    ipython_dir=self.ipython_dir, user_ns=self.user_ns)
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\IPython\config\configurable.py", line 337, in instance
    inst = cls(*args, **kwargs)
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\IPython\core\interactiveshell.py", line 512, in __init__
    self.init_readline()
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\IPython\core\interactiveshell.py", line 1912, in init_readline
    import IPython.utils.rlineimpl as readline
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\IPython\utils\rlineimpl.py", line 21, in <module>
    _rl = __import__(_rlmod_name)
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\readline.py", line 6, in <module>
    from pyreadline.rlmain import Readline
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\pyreadline\__init__.py", line 11, in <module>
    from . import unicode_helper, logger, clipboard, lineeditor, modes, console
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\pyreadline\console\__init__.py", line 15, in <module>
    from .console import *
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\site-packages\pyreadline\console\console.py", line 610, in <module>
    msvcrt = cdll.LoadLibrary(ctypes.util.find_msvcrt())
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\ctypes\__init__.py", line 425, in LoadLibrary
    return self._dlltype(name)
  File "C:\Users\wwerner\AppData\Local\Programs\Python\Python35\lib\ctypes\__init__.py", line 347, in __init__
    self._handle = _dlopen(self._name, mode)
TypeError: bad argument type for built-in operation```

Doing `py -m pip uninstall pyreadline` makes it work, once again.

Activity

  1. takluyver commented on Apr 14, 2015

    @takluyver
    Member

    @jstenar can you take a look? This looks like it could be an issue with pyreadline.

    It may also be an upstream bug in Python - I think they're planning to move to VS2015 for 3.5, and that brings some changes to the Visual C runtime. ctypes.util.find_msvcrt() could be broken. I'm at PyCon, I'll try to ping the Microsoft guys and see what the status of this is.

  2. takluyver commented on Apr 14, 2015

    @takluyver
    Member

    I spoke to Steve Dower, and pyreadline will need to change. I have opened pyreadline/pyreadline#32.

  3. added this to the no action milestone on Aug 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions