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
_______________________________________________
freebsd-python@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-python
To unsubscribe, send any mail to "freebsd-python-unsubscr...@freebsd.org"

Reply via email to