Python Forum
TypeError: cannot pickle ‘_asyncio.Future’ object
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TypeError: cannot pickle ‘_asyncio.Future’ object
#2
Is "don't use windows" an acceptable answer? Your application uses pickle because multiprocessing in windows spawns processes. New processes don't share any resources with the parent process. If you did this on Linux (or maybe on mac?) the new processes would be forked. The new process starts knowing everything the parent process did up to that point. You would have no problem with passing a websocket to the new process because the websocket object would exist in both processes with no serialization required.

If you can't do that, how about making your main process a server application? The main process creates a thread to listen for connect requests.
The spawned processes open a socket connection to the server and pass facial recognition information (some sort of image?) to the server. I don't know a lot about web anything, but this is how I would create an application like this using normal sockets.
Reply


Messages In This Thread
RE: TypeError: cannot pickle ‘_asyncio.Future’ object - by deanhystad - Mar-07-2024, 03:40 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Merge htm files with shutil library (TypeError: 'module' object is not callable) Melcu54 7 3,348 Mar-09-2025, 04:25 PM
Last Post: Pedroski55
  I am getting this TypeError: 'TreasureMap' object is not subscriptable. makilakos 2 1,219 May-25-2024, 07:58 PM
Last Post: deanhystad
  error in class: TypeError: 'str' object is not callable akbarza 2 1,714 Dec-30-2023, 04:35 PM
Last Post: deanhystad
Bug TypeError: 'NoneType' object is not subscriptable TheLummen 4 3,558 Nov-27-2023, 11:34 AM
Last Post: TheLummen
  Migration of Python2 and Python3 using Modernize and Future Rakshan 5 4,000 Oct-05-2023, 08:55 AM
Last Post: zuri
  TypeError: 'NoneType' object is not callable akbarza 4 13,833 Aug-24-2023, 05:14 PM
Last Post: snippsat
  [NEW CODER] TypeError: Object is not callable iwantyoursec 5 5,511 Aug-23-2023, 06:21 PM
Last Post: deanhystad
  TypeError: 'float' object is not callable #1 isdito2001 1 1,891 Jan-21-2023, 12:43 AM
Last Post: Yoriz
  TypeError: a bytes-like object is required ZeroX 13 15,483 Jan-07-2023, 07:02 PM
Last Post: deanhystad
  TypeError: 'float' object is not callable TimofeyKolpakov 3 3,497 Dec-04-2022, 04:58 PM
Last Post: TimofeyKolpakov

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020