Multiprocessing bug, is information ever omitted from a traceback?

John Ladasky ladasky at my-deja.com
Wed Dec 28 03:51:48 EST 2011


I hope that the interested parties who offered me help will remember
this thread title.  It has been a few weeks.

After fussing around with an alternate installation of Python 2.7.2 on
top of Ubuntu Linux 10.04, I decided it would be easier to upgrade to
Ubuntu 11.10, for which Python 2.7.2 is the default Python version.  I
have reproduced my Python 2.6.6 bug in Python 2.7.2, as you will see.

On Dec 9, 3:14 pm, I wrote:

> All lines of code referenced in the traceback are in the standard
> library code:
>
> Exception in thread Thread-1:
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/threading.py", line 532, in
> __bootstrap_inner
>     self.run()
>   File "/usr/lib/python2.6/threading.py", line 484, in run
>     self.__target(*self.__args, **self.__kwargs)
>   File "/usr/lib/python2.6/multiprocessing/pool.py", line 284, in
> _handle_tasks
>     put(task)
> TypeError: expected string or Unicode object, NoneType found
>
> Fortunately, I have a working version of my code.  I was trying to add
> new features, and only my new code is causing trouble.  This has
> allowed me to examine the contexts of task when everything works.
>
> Task is not a string when the program works.  Task is not None when
> the program doesn't work.  In fact, task is a deeply-nested tuple.  NO
> PART of this tuple ever contains any strings, as far as I can tell.
> More details in my original thread.

Here's the traceback that I obtained tonight.  It's essentially the
same, except for the line numbers in the library code and the thread
number which yielded the exception:

| Exception in thread Thread-2:
| Traceback (most recent call last):
|   File "/usr/lib/python2.7/threading.py", line 552, in
__bootstrap_inner
|     self.run()
|   File "/usr/lib/python2.7/threading.py", line 505, in run
|     self.__target(*self.__args, **self.__kwargs)
|   File "/usr/lib/python2.7/multiprocessing/pool.py", line 315, in
_handle_tasks
|     put(task)
| TypeError: expected string or Unicode object, NoneType found


I still have more work to do, I know.  I will try to pare down my
fairly-complex code to a minimal example.  Check back again in a few
days?  Weeks?  Thanks!



More information about the Python-list mailing list