Deutsch English Français Italiano |
<mailman.27.1725285631.2917.python-list@python.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!fu-berlin.de!uni-berlin.de!not-for-mail From: marc nicole <mk1853387@gmail.com> Newsgroups: comp.lang.python Subject: Getting a Process.start() error pickle.PicklingError: Can't pickle <type 'module'>: it's not found as __builtin__.module with Python 2.7 Date: Mon, 2 Sep 2024 16:00:15 +0200 Lines: 24 Message-ID: <mailman.27.1725285631.2917.python-list@python.org> References: <CAGJtH9Tw0ZoB51XCA_4=CGu8cO6LoKw9RF5pBuYDoQJfHA6h_g@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: news.uni-berlin.de xgmk34OlVjB8ASA05seI0wQeiO3QuNRu8MK8Tq/Kxh8g== Cancel-Lock: sha1:fmNhDmUj0vnGsmieyGXZ7JDX03I= sha256:UeARiZwmk0eUT/OJagfJ37HaOjyLc8rUZVkUaUZCAhU= Return-Path: <mk1853387@gmail.com> X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org Authentication-Results: mail.python.org; dkim=pass reason="2048-bit key; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=K7vVL4HD; dkim-adsp=pass; dkim-atps=neutral X-Spam-Status: OK 0.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'def': 0.04; 'thread': 0.05; 'subject:error': 0.07; 'subject:module': 0.07; '2.7': 0.09; 'subject:not': 0.09; 'subject:skip:P 10': 0.09; 'subject:Python': 0.12; 'import': 0.15; 'pickle': 0.16; 'subject:() ': 0.16; 'subject:2.7': 0.16; 'subject:found': 0.16; 'subject:skip:p 20': 0.16; 'python': 0.16; "can't": 0.17; 'to:addr:python-list': 0.20; 'skip:_ 10': 0.22; 'to:no real name:2**1': 0.22; 'code': 0.23; 'skip:p 30': 0.23; 'follows:': 0.26; 'function': 0.27; 'error': 0.29; 'sfxlen:2': 0.31; 'anybody': 0.32; 'execution': 0.32; 'subject:Can': 0.32; 'message-id:@mail.gmail.com': 0.32; 'but': 0.32; 'windows': 0.34; 'received:google.com': 0.34; 'following': 0.35; 'from:addr:gmail.com': 0.35; "skip:' 10": 0.37; 'using': 0.37; "it's": 0.37; 'could': 0.38; 'rest': 0.39; 'hello,': 0.40; 'want': 0.40; 'should': 0.40; 'provide': 0.60; 'right': 0.68; 'skip:p 50': 0.84; 'subject:type': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1725285627; x=1725890427; darn=python.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=YFDlcOqwXo+UWtg35kEDx+5VzmigAd5xNkVDArYWaTM=; b=K7vVL4HDmKARKUlibXd6F0JGJU2omhKUfSK659lyKtOR1bcI+eWXgjcARhBrHtvMwn d0N+WmXOta1DTft/oL5kucrkg/8F8eC+3AwG5RvSgckc7fVEakcr2wNlclpMlkOOqfOW NCyipS8SupCJ9gTc6DaojZHZpNK0CicabzbcSk0xKikGmQ4ld58NSnczs2yKL3cz83oQ fURA23KCkF8p7rJhA1DjaxP8hx/hntsja6tjA4Fc2vTcPeC/7E12JHHd0vfNGpci2+AO YQ/P5IuTL3+yol8nBb7DOQ75LT261Mt7Sn4gXsuUbAj9oqgey+Mn1hdLmz6SlcBFZX+v Qcew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725285627; x=1725890427; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=YFDlcOqwXo+UWtg35kEDx+5VzmigAd5xNkVDArYWaTM=; b=UyO5FqGb096eBbaVNUC9v40teE3R5O1SxRVxwIWUOinXTYSKU0lo3O2C0D8UIfUCeU QZx1ETR5CLyTkPdfJoUewsyLFktuHQ6ap6ifjJMKRFXm8i7M6epnj4mnzGu1LLU11Ru6 K82wIFk/kYTF6Rt8cWf171rKFvvaumTzQdvAmDxCWtPfjnsuJz8Vu3l/jAMUsRVOcSUM qP5FXHd24v9N7u9r7LoK6I8Rr2qbSIybgyK5n7W3grRwlIGahvSrbYb2aJZ0XuBtWirl MunL+TLFg0O2N08D95Gh7aXdQNb+A5iUDBnI3Vijbkhcgrzm2QKIaW0JZRRwhooIcnh2 R3WA== X-Forwarded-Encrypted: i=1; AJvYcCUmOEBmHPSgEWjm/gc13u/bxdAX3N7XXEl/9kE7frH8sKVww0ITh/EJvIarkRAN2z7H96RHoKMZnDtKbQ==@python.org X-Gm-Message-State: AOJu0YxXp2o/QLAywvRwQlSA6tvI6PQpJjqoqGe1+k3WpnqttToNY7m1 gvOVXuKcjCdPuO77dOV+2ufsibl3CSn/+u4+od86hnM5x85JIen5dyJhXVpjTrCvHuAVgccAIki w2l4CV3kwGo8dZH7tuM6GjgcvwsPudMNH X-Google-Smtp-Source: AGHT+IGUIwzsrloMKSnKpC8Dq23K7PlkYd9Uv69r0KLv1JH/4DGmKvyD3yC4d/sKuD3NTOWPoB/wwsxXsZkRABlRE9s= X-Received: by 2002:a05:690c:610c:b0:664:8646:4d02 with SMTP id 00721157ae682-6d40dd720bdmr116680227b3.12.1725285627255; Mon, 02 Sep 2024 07:00:27 -0700 (PDT) X-Content-Filtered-By: Mailman/MimeDel 2.1.39 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.39 Precedence: list List-Id: General discussion list for the Python programming language <python-list.python.org> List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> List-Archive: <https://mail.python.org/pipermail/python-list/> List-Post: <mailto:python-list@python.org> List-Help: <mailto:python-list-request@python.org?subject=help> List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> X-Mailman-Original-Message-ID: <CAGJtH9Tw0ZoB51XCA_4=CGu8cO6LoKw9RF5pBuYDoQJfHA6h_g@mail.gmail.com> Bytes: 5537 Hello, I am using Python 2.7 on Windows 10 and I want to launch a process independently of the rest of the code so that the execution continues while the started process proceeds. I am using Process().start() from Python 2.7 as follows: from multiprocessing import Process def do_something(text): print(text) if __name__ == "__main__": q = Process(target=do_something,args=("somecmd") ) q.start() # following code should execute right after the q.start() call (not until it returns) ..... But getting the error at the call of Process().start(): pickle.PicklingError: Can't pickle <type 'module'>: it's not found as __builtin__.module anybody could provide an alternative to call the function do_something() in a separate thread ?