[pypy-issue] [issue1227] LookupError for str.encode() in a multi threaded application

Attila Nagy tracker at bugs.pypy.org
Fri Aug 3 12:08:00 CEST 2012


New submission from Attila Nagy <bra at fsn.hu>:

I have a simple line in a method, called from multiple threads:
'string'.encode('utf8')
This occasionally (so far my observations show that only during the startup of
the program) raises a LookupError:
  File "concorde.py", line 752, in push_msg
    'string'.encode('utf8')
LookupError: unknown encoding: utf8

Is this correct or possible at all? During subsequent invocations, it works fine.
So far I couldn't reproduce this with cpython.
Python 2.7.2 (341e1e3821fff77db3bb5cdb7a4851626298c44e, Jun 16 2012, 19:05:14)
[PyPy 1.9.0] on freebsd9 (amd64)

----------
messages: 4634
nosy: pypy-issue
priority: bug
release: 1.9
status: unread
title: LookupError for str.encode() in a multi threaded application

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1227>
________________________________________


More information about the pypy-issue mailing list