From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 7M2dH15GvV+vEAAA0tVLHw (envelope-from ) for ; Tue, 24 Nov 2020 17:43:58 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id cNgjG15GvV8vNQAAB5/wlQ (envelope-from ) for ; Tue, 24 Nov 2020 17:43:58 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F37F0940482 for ; Tue, 24 Nov 2020 17:43:57 +0000 (UTC) Received: from localhost ([::1]:56392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1khcM8-0001O3-T0 for larch@yhetil.org; Tue, 24 Nov 2020 12:43:56 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khFqX-0001Gx-L8 for emacs-orgmode@gnu.org; Mon, 23 Nov 2020 12:41:52 -0500 Received: from mail-vi1eur05olkn2017.outbound.protection.outlook.com ([40.92.90.17]:34625 helo=EUR05-VI1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1khFqS-0002ju-Uk for emacs-orgmode@gnu.org; Mon, 23 Nov 2020 12:41:47 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hT5M/S0RuiN0Agh/rKrgBppPcOwoXa0NZonBdm9pm5gNa0zA8q9eNmI8zAxbx7TYq5P4aZMyX8OBWCL3LB+PolkweFSgE+SUP+Oa5bt7FutdaZBfhWkLEx+XkSNRuNjcCLhYH4hcxarHI+rhqOeK887F0dr5vGFwWpEk4IfeY7haERJur0b6+NI1ok0pbtenaBc8dfanitcavHj8gbfknq72wpjYApxH34hNFu5vkZYHBtKCqzfWcFDMZQ86u+e85D5ml5CU2l8HHyvlA/ZjwjqBrNknSLZOXQ0ypooKTsI6wz6ZqHhpgGsUm//jwAtTuMUnwUc+Cixu7q5GHTiQGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FtNaH4W8hA4pYJr4B5G6v9zBGsGwzhW9T6fc6HxZuIo=; b=ih31l5Z2GowkTxjFHAFU8iKYVgMhhImRu60BhNCqqJ0ILdbPYqpeYlApZt/ASKmYys5C7P7JBSgNQGfpoio/8bnPHHTNKwpFU/2LtuwSKNzdKuC4pRKCGTmnaMH6maODEMk4mIfIbTsBZ0rYwUkyEIcsbtTaLylp6SU9c1vo5qN9qg38ZECmKU+SlvLOl0bG8VXfV1umRYdL8ubniQEPmwWBvMRs4ODRY5jobUpG5yTspftmIgxFR7cNa5uf5MvNz9Tybl4QyZtFMFdkTPXPUwCX54qS0WdPZXuiq8rUnPRqLxI++bcHltrtDR+j8ksOz6F/n1qUCgVll13avkpBkQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from DB8EUR05FT010.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::48) by DB8EUR05HT158.eop-eur05.prod.protection.outlook.com (2a01:111:e400:fc0f::352) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20; Mon, 23 Nov 2020 17:26:39 +0000 Received: from AM0PR04MB5265.eurprd04.prod.outlook.com (2a01:111:e400:fc0f::49) by DB8EUR05FT010.mail.protection.outlook.com (2a01:111:e400:fc0f::203) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.20 via Frontend Transport; Mon, 23 Nov 2020 17:26:39 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:FCB4DCAC2EC899989CA6FBE9159667A731D4C5F44A61E84CC4EFAF1E3EBA25D9; UpperCasedChecksum:829BCB6E60DA86658AB1BA9F374311E8B3B7418D46B0E2680F7D840042889FF9; SizeAsReceived:7157; Count:43 Received: from AM0PR04MB5265.eurprd04.prod.outlook.com ([fe80::c8be:b95d:5deb:a1e8]) by AM0PR04MB5265.eurprd04.prod.outlook.com ([fe80::c8be:b95d:5deb:a1e8%5]) with mapi id 15.20.3589.025; Mon, 23 Nov 2020 17:26:39 +0000 User-agent: mu4e 1.2.0; emacs 26.3 From: paul To: emacs-orgmode@gnu.org Subject: Bug report: remote file python src output gives FileNotFound (+ suggested fix) Date: Mon, 23 Nov 2020 18:26:38 +0100 Message-ID: Content-Type: text/plain X-TMN: [i1Pf0N1eHpVBVwsg3YcC7L7uXApmDn2I] X-ClientProxiedBy: AM3PR03CA0068.eurprd03.prod.outlook.com (2603:10a6:207:5::26) To AM0PR04MB5265.eurprd04.prod.outlook.com (2603:10a6:208:c7::31) X-Microsoft-Original-Message-ID: <87lfesgf1t.fsf@live.nl> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from pop-os (82.169.164.161) by AM3PR03CA0068.eurprd03.prod.outlook.com (2603:10a6:207:5::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3589.21 via Frontend Transport; Mon, 23 Nov 2020 17:26:38 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 43 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 703a7146-df4e-42bd-8e84-08d88fd4efaf X-MS-TrafficTypeDiagnostic: DB8EUR05HT158: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: K4LanZWgZXk+a5iRfUGl6OtKeMTaMMjjMAitAIpE173CGJ2aOfcWwFes9Cyr7X10pFdEEb3dB6wMg2SG31SNmNRzgo5A1QPuQ7YYY9d+BGin9Awi7Ds7FdjRNkgzt49YcHMQTmTSdRIhFpLarUTg8tkvBQbR870g8dYP1WjPoelGi5mT4n0iEETVQleBI75+vhiGnIwIf9PQlRayW4RsOA== X-MS-Exchange-AntiSpam-MessageData: gtrCu8SdgYjVOL70kauJfqAU6PJQyUXlT281aE0PL0L3RjbHLTN2DfF2MyGMO92QIWNFIL+rHmfUh/g7l5oAgOdWUyQ8IgUHIPNr8RZreVGN3+hwKL0+IsmYOqxeGo48DPupei/WT/pwJ0lFt1FZiw== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 703a7146-df4e-42bd-8e84-08d88fd4efaf X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Nov 2020 17:26:39.6729 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-AuthSource: DB8EUR05FT010.eop-eur05.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8EUR05HT158 Received-SPF: pass client-ip=40.92.90.17; envelope-from=paul_lodder@live.nl; helo=EUR05-VI1-obe.outbound.protection.outlook.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 24 Nov 2020 12:43:06 -0500 X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=none; arc=pass (microsoft.com:s=arcselector9901:i=1); dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=live.nl (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.91 X-TUID: qUKl2eMjSJNp When working remotely, a python SRC block with a session and :results set to output will return a FileNotFoundError. To reproduce this bug: 1. Open a .org file remotely 2. Insert the following #+BEGIN_SRC python :results output :session check print("a") #+END_SRC 3. org-ctrl-c-ctrl-c in the code block I already figured out how to fix it: In ob-python.el.gz, the function org-babel-python-evaluate-session the let-variable tmp-src-file is made, which contains tramp-prefix when working remotely. But the tramp-prefix is still there here: (format org-babel-python--exec-tmpfile tmp-src-file) which causes the remotely executed command to still contain the prefix, and hence it cannot find it. To fix, the line above could be replaced with (format org-babel-python--exec-tmpfile (or (file-remote-p tmp-src-file 'localname) tmp-src-file)) Hope this helps :) (and many many thanks for org-mode)