This is the end of a script I wrote.
while 1:
if __name__ == '__main__':
if afkbot_activate == 1:
print("Thread 1")
afk = Process(target=afkbot, args=(server, 1200000, 52797,))
afk.start()
afk.join()
if adbot_activate == 1:
print("Thread 2")
adb = Process(target=adbot, args=(server, 240, 1, msg_1, msg_2, msg_3, msg_4,))
adb.start()
adb.join()
if votebot_activate == 1:
print("Thread 3")
voteb = Process(target=votebot, args=(server, 30,))
voteb.start()
voteb.join()
Both functions do exist, but somehow this returns the Error
Traceback (most recent call last):
File "ts3bot_ultimate.py", line 231, in <module>
afk.start()
File "C:\Python33\lib\multiprocessing\process.py", line 111, in start
self._popen = Popen(self)
File "C:\Python33\lib\multiprocessing\forking.py", line 241, in __init__
dump(process_obj, to_child, HIGHEST_PROTOCOL)
File "C:\Python33\lib\multiprocessing\forking.py", line 160, in dump
ForkingPickler(file, protocol).dump(obj)
File "C:\Python33\lib\socket.py", line 116, in __getstate__
raise TypeError("Cannot serialize socket object")
TypeError: Cannot serialize socket object
How does it work? This does not work... And I have no idea why. I looked up the Multiprocessing module documentation and even (sortof) copied it and modified it. Please keep it clear and easy, it is my first time working with the Multiprocessing module, but I couldn't find any good posts or documentation that could help me fix this.