[pypy-issue] Issue #1997: PyPy3: curses.initscr() raises ctype TypeError (pypy/pypy)

thomasballinger issues-reply at bitbucket.org
Sat Mar 14 21:57:55 CET 2015


New issue 1997: PyPy3: curses.initscr() raises ctype TypeError
https://bitbucket.org/pypy/pypy/issue/1997/pypy3-cursesinitscr-raises-ctype-typeerror

thomasballinger:

Leads on from https://bitbucket.org/pypy/pypy/issue/1946/pypy3-cursesinitscr-raises-ctype-typeerror. In addition to https://bitbucket.org/pypy/pypy/commits/d8475a6257bc it seems
https://bitbucket.org/thomasballinger/pypy/commits/d71a17fd7039c9588e5121ab1cf2300e03589645 is necessary to make things like blessings work.


```
(bpythonpypy3)tom-mba:bpython tomb$ python --version
Python 3.2.5 (b2091e973da69152b3f928bfaabd5d2347e6df46, Dec 15 2014, 08:54:30)
[PyPy 2.4.0 with GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.56)]
(bpythonpypy3)tom-mba:bpython tomb$ cat test.py
import blessings
term = blessings.Terminal()
print(term.clear_eos)
(bpythonpypy3)tom-mba:bpython tomb$ python test.py
Traceback (most recent call last):
  File "test.py", line 3, in <module>
    print(term.clear_eos)
  File "/Users/tomb/.virtualenvs/bpythonpypy3/site-packages/blessings/__init__.py", line 175, in __getattr__
    resolution = (self._resolve_formatter(attr) if self.does_styling
  File "/Users/tomb/.virtualenvs/bpythonpypy3/site-packages/blessings/__init__.py", line 368, in _resolve_formatter
    return ParametrizingString(self._resolve_capability(attr))
  File "/Users/tomb/.virtualenvs/bpythonpypy3/site-packages/blessings/__init__.py", line 378, in _resolve_capability
    code = tigetstr(self._sugar.get(atom, atom))
  File "/usr/local/Cellar/pypy3/2.4.0/libexec/lib_pypy/_curses.py", line 1360, in tigetstr
    val = lib.tigetstr(capname)
TypeError: initializer for ctype 'char *' must be a bytes or list or tuple, not str
(bpythonpypy3)tom-mba:bpython tomb$
```

See also https://github.com/bpython/bpython/issues/502#issuecomment-80511264




More information about the pypy-issue mailing list