On 2013-01-12 04:43, alek...@silk.bz wrote:
Hello.

Can someone help me to resolv error.

code:

[snip]

@Async
def fnc(pi, pp):

     print "fnc-"
     i=pi
     while ( i < 10000000 ) :
         i=i+1
     print "fnc+"
     pass

@Async
def fnc1(pp):
     print "fnc1-",pp


@Async
def fnc2():
     print "fnc2-"
     i=0
     while ( i < 100000 ) :
         i=i+1
     print "fnc2+"
     pass

fnc(i=0,pp="123123")
fnc1()


error:

Exception in thread fnc1:
Traceback (most recent call last):
   File "C:\Python27\lib\threading.py", line 551, in __bootstrap_inner
     self.run()
   File "C:\Python27\lib\threading.py", line 504, in run
     self.__target(*self.__args, **self.__kwargs)
   File "C:/Users/rootiks/YandexDisk/py/myftpbackup/asynclib.py", line 26, in 
run
     self.Result = self.Callable(*args, **kwargs)
TypeError: fnc1() takes exactly 1 argument (0 given)

1. You're calling function 'fnc' with keyword arguments 'i' and 'pp';
it's expecting 'pi' and 'pp'.

2. You're calling function 'fnc1' with no arguments; it's expecting one
argument.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to