Date: Wed, 10 Jun 2015 14:02:06 -0700 From: Craig Rodrigues <rodrigc@FreeBSD.org> To: Robert Simmons <rsimmons0@gmail.com> Cc: freebsd-python@freebsd.org Subject: Re: Python Subprocess Crontab Problem Message-ID: <CAG=rPVdkzy%2BK1KV2AP4O-j-4UqoPz5pLrQX7u9NJkEuuqQ5eqA@mail.gmail.com> In-Reply-To: <CA%2BQLa9BjC=M-5wxA0gzoTJO1xHL9XbhpTN10QhhrdCG9bxf3Lg@mail.gmail.com> References: <CA%2BQLa9BjC=M-5wxA0gzoTJO1xHL9XbhpTN10QhhrdCG9bxf3Lg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 10 > Here is how I'm calling the script in crontab: > PATH=$PATH:/usr/local/bin > I can't remember offhand, but I don't think you can do that. I think you may need to fully specify the PATH instead of using $PATH. > errors = open('/home/myuser/error', 'wb') > > with tempfile.TemporaryDirectory() as tmpdirname: > tempthing = os.path.join(tmpdirname, thing) > fh = open(tempthing, 'wb') > fh.write(b'123') > fh.close() > zipname = '{}.zip'.format(thing) > ziptempfile = os.path.join(tmpdirname, zipname) > Can you add right here: print("PATH: %s" % os.environ['PATH'], file=errors) and see what the PATH is in your errors file? -- Craig
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAG=rPVdkzy%2BK1KV2AP4O-j-4UqoPz5pLrQX7u9NJkEuuqQ5eqA>