467,876 Members | 1,190 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,876 developers. It's quick & easy.

TypeError: 'NoneType' object is not callable

Hello,
I am using Python 2.3.2 with a C++ extention DLL in
muti-threaded environment.

1. For each new thread I create a separate
sub-interpreter.
2. Each thread executes multiple python statements
calling the class objects in my extention DLL.
3. Before each execution I import my extention module
using;
import myModule
4. I destoy each sub-interpreter at the end of that
particular thread.
5. Python initialization and finalization happens in
the main thread.

I am observing that;
As explained above when multiple threads are running.
And as one of these threads finishes, in other running
threads I start getting "TypeError: 'NoneType' object
is not callable" error on the methods called on class
objects in extention module.

Does anyone know why this might be happening ? Is
there any specific way I should be using Python and
Extention modules in multi-threaded environment ?

Any help is appreciated !!!
Thanks,
Atul Kshirsagar

__________________________________
Do you Yahoo!?
Yahoo! Search - Find what youíre looking for faster
http://search.yahoo.com

Jul 18 '05 #1
  • viewed: 12105
Share:
1 Reply
In article <ma************************************@python.org >,
Atul Kshirsagar <at************@yahoo.com> wrote:
I am observing that;
As explained above when multiple threads are running.
And as one of these threads finishes, in other running
threads I start getting "TypeError: 'NoneType' object
is not callable" error on the methods called on class
objects in extention module.
Does anyone know why this might be happening ? Is
there any specific way I should be using Python and
Extention modules in multi-threaded environment ?
Any help is appreciated !!!


I'm guessing here. My test gets a different error
message:
Python 2.3 (#46, Jul 29 2003, 18:54:32) [MSC v.1200 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import types
types.NoneType <type 'NoneType'> n = types.NoneType()

Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: cannot create 'NoneType' instances
The object None is intended to be unique, so it would
make sense if programs were forbidden from making more
instances of NoneType.

Whatever route you've taken to get a reference to
types.NoneType which you then call is probably a mistake.

Good Luck. Mel.
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Ď5ŘHH575-UAZWKVVP-7H2H48V3 | last post: by
1 post views Thread by homepricemaps | last post: by
5 posts views Thread by Randall Parker | last post: by
1 post views Thread by Gary Wessle | last post: by
9 posts views Thread by thompson.marisa | last post: by
2 posts views Thread by AWasilenko | last post: by
33 posts views Thread by christophertidy | last post: by
6 posts views Thread by ssecorp | last post: by
reply views Thread by jack112 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.