# Problem using TThread with PyROOT

**URL:** <https://root-forum.cern.ch/t/problem-using-tthread-with-pyroot/22331>\
**Category:** ROOT\
**Created:** [December 7, 2016, 4:42pm UTC](https://root-forum.cern.ch/t/problem-using-tthread-with-pyroot/22331 "2016-12-07T16:42:43Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![mauroroot](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/m/7c8e57/32.png) [@mauroroot](https://root-forum.cern.ch/u/mauroroot)\
**Post date:** [December 7, 2016, 4:42pm UTC](https://root-forum.cern.ch/t/problem-using-tthread-with-pyroot/22331/1 "2016-12-07T16:42:43Z")

</div>

Dear Experts,  
I’m defining a very simple program:

def filler\_function(argv = None):  
it = 0

myThread = TThread(“myThread”,filler\_function)  
myThread.Run()

but I get the following error:

Traceback (most recent call last):  
File “[TestPyROOT.py](http://TestPyROOT.py)”, line 191, in   
sys.exit(main())  
File “[TestPyROOT.py](http://TestPyROOT.py)”, line 158, in main  
myThread = TThread(“myThread”,filler\_function)  
TypeError: none of the 5 overloaded methods succeeded. Full details:  
TThread::TThread(long id = 0) =\>  
takes at most 1 arguments (2 given)  
TThread::TThread(void\*(_)(void_) fn, void\* arg = 0, TThread::EPriority pri = kNormalPriority) =\>  
could not convert argument 1  
TThread::TThread(void(_)(void_) fn, void\* arg = 0, TThread::EPriority pri = kNormalPriority) =\>  
could not convert argument 1  
TThread::TThread(const char\* thname, void\*(_)(void_) fn, void\* arg = 0, TThread::EPriority pri = kNormalPriority) =\>  
could not convert argument 2  
TThread::TThread(const char\* thname, void(_)(void_) fn, void\* arg = 0, TThread::EPriority pri = kNormalPriority) =\>  
could not convert argument 2

Can you please tell me how can I use TThread in PyROOT ?  
Many thanks,

- Mauro.

I’m not sure I understand why.  
Cheers,

- Mauro.

---

_[View the full topic](https://root-forum.cern.ch/t/problem-using-tthread-with-pyroot/22331)._
