From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IPdLFVSIwl/zdwAA0tVLHw (envelope-from ) for ; Sat, 28 Nov 2020 17:26:44 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id aMQrEVSIwl+QWQAA1q6Kng (envelope-from ) for ; Sat, 28 Nov 2020 17:26:44 +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 B291C94011A for ; Sat, 28 Nov 2020 17:26:43 +0000 (UTC) Received: from localhost ([::1]:60690 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kj3zd-00029j-Fg for larch@yhetil.org; Sat, 28 Nov 2020 12:26:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41356) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kj3yt-00029J-Kq for emacs-orgmode@gnu.org; Sat, 28 Nov 2020 12:25:56 -0500 Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:41782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kj3ym-0004qL-OP for emacs-orgmode@gnu.org; Sat, 28 Nov 2020 12:25:53 -0500 Received: by mail-pl1-x635.google.com with SMTP id x4so2454322pln.8 for ; Sat, 28 Nov 2020 09:25:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=XV5ZyuXeXrXsqVKZWUCRDoLE0cjDxoX2eqrQVI+CM8k=; b=gSCts6/ZKBgUAPpq14ikH+v7KmDUDg1uKYfHqZLUc8LTp3DgqgGhiyCuHTUSpYkBVk GwLlFkQ0ZdukAvAp3m7A/M5O/OtdSJNCiEKmpCDzdJqBKT74N3nkVKt6Vy+/hKJMzXPo 7ZGnS9m/lod9Z0+0OCq/9TKIun/KXpKWLGZikrlN+2AfM0IrGGQgORvOvVZHt9xztf+I AK6VTqpuBJHe40xrxq9vUL+2wodT6YGmF4LkOvzW9sbo2XaDSTJCSFRKSipef5ZdLjLv Xqd3E/vNl0YaVpZ3afydpZM20jEn9IaXUKFTOz4tSWjQct6xUqIGlIfB1kW2VB3xl5Y1 IiWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=XV5ZyuXeXrXsqVKZWUCRDoLE0cjDxoX2eqrQVI+CM8k=; b=fWfQPrKxQxJfXJ6RkIsdNND1Gs95LdWIEZuJVCUdXDsgIEGpAKhxTFdY9ORTwJ/y4e LQORceOYEoEyVXa33Q4HYAd+emEZkeSmvCpYGAgP7FJHMD4o8p27SUZsMrdm/qdA3DOO +slUPGs7T48WlU87qafvqy8RhdJBn4fQynig5NfyLfJi6l94gCD1Xo0DlGoDeOv5PRe5 7clxQWT+dN2KheSuyJRu0m2KkiV+VzepN7waVTEINXloOT9sqwebGkDe/mrCevZaPG0t Z0KCCRfIwsxk2e301cFflbjvZAaqY2Bl9RDJZzDAkkWwY111es6WLdC1d8Z/tBmnnS38 NN3Q== X-Gm-Message-State: AOAM530J8UweUIhYA8cpEsceKZ9g31s4XAUVAHzmPqgqobbnbDx+qnFz amiGmVvxqNb9yZ3SUNqxqwY= X-Google-Smtp-Source: ABdhPJwWuGmMlkXHKplCgHcrpM11hPmE+BeJNZZbiGApG8D5uV5f7Chcy9DVVliPEsklHEWEveGLGA== X-Received: by 2002:a17:902:402:b029:da:2cb9:56e8 with SMTP id 2-20020a1709020402b02900da2cb956e8mr11408594ple.1.1606584346705; Sat, 28 Nov 2020 09:25:46 -0800 (PST) Received: from localhost (199-83-220-90.PUBLIC.monkeybrains.net. [199.83.220.90]) by smtp.gmail.com with ESMTPSA id y25sm11124303pfn.44.2020.11.28.09.25.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Nov 2020 09:25:45 -0800 (PST) From: Jack Kamm To: paul , emacs-orgmode@gnu.org Subject: Re: Bug report: remote file python src output gives FileNotFound (+ suggested fix) In-Reply-To: References: Date: Sat, 28 Nov 2020 09:25:45 -0800 Message-ID: <878sal4cme.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::635; envelope-from=jackkamm@gmail.com; helo=mail-pl1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.97 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=gSCts6/Z; dmarc=pass (policy=none) header.from=gmail.com; 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-TUID: 0VSJlXDzTMwM Hi Paul, I'm unable to reproduce the issue, and believe this issue has already been fixed in the latest version of org-mode. See this patch [1]. Could you please upgrade to Org 9.4 and test again? Thanks, Jack [1] https://orgmode.org/list/87h7t16red.fsf@pc.i-did-not-set--mail-host-address--so-tickle-me/ paul writes: > 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)