[pypy-issue] Issue #2425: str error from 'future' module in PyPy2 (pypy/pypy)

Daniil Yarancev issues-reply at bitbucket.org
Wed Oct 26 08:22:46 EDT 2016


New issue 2425: str error from 'future' module in PyPy2
https://bitbucket.org/pypy/pypy/issues/2425/str-error-from-future-module-in-pypy2

Daniil Yarancev:

## Error ##:

```
#!python

>>>> print(str('ghbdtn'))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tiber/bench/pypy2-v5.4.1-linux64/site-packages/future/types/newstr.py", line 204, in encode
    if errors == 'surrogateescape':
UnboundLocalError: local variable 'errors' referenced before assignment

```
## How to reproduce: ##

```
#!bash
pypy -m pip install future

```


And try this code:


```
#!python

from __future__ import unicode_literals
from builtins import str
print(str('hello'))
```





More information about the pypy-issue mailing list