|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
python traceback captured when run from cron
Looking to improve my understanding of why the following situation occurs.
I'm running OpenBSD 6.1 -stable amd64. Binary ports package of urlwatch installed using pkg_add, v2.6 (thanks @sthen !) I used to run i386, which can be a different set and versions of ports. I did move my urlwatch version 1 data set from a different machine (running OpenBSD 6.0 i386), read the upgrade notes on github README.md, and followed them. I run urlwatch interactively as a standard user and as a daily cron job as my standard user. When urlwatch reports changes under cron execution, I have it configured for email notification. This works as expected, to OpenSMTPD for local delivery. After the change event report, the following traceback is captured as part of the cron job's execution. Code:
Traceback (most recent call last): File "/usr/local/bin/urlwatch", line 101, in <module> urlwatch_command.run() File "/usr/local/lib/python3.6/site-packages/urlwatch/command.py", line 167, in run self.urlwatcher.close() File "/usr/local/lib/python3.6/site-packages/urlwatch/main.py", line 96, in close self.report.finish() File "/usr/local/lib/python3.6/site-packages/urlwatch/handler.py", line 125, in finish ReporterBase.submit_all(self, self.job_states, duration) File "/usr/local/lib/python3.6/site-packages/urlwatch/reporters.py", line 92, in submit_all subclass(report, cfg, job_states, duration).submit() File "/usr/local/lib/python3.6/site-packages/urlwatch/reporters.py", line 315, in submit print(self._red(line)) UnicodeEncodeError: 'ascii' codec can't encode character '\xdc' in position 2: ordinal not in range(128) I would not have noticed these messages if they weren't captured by the cron itself. I have run urlwatch interactively many times in the past, and I don't ever recall seeing traceback output while doing that. I get that I can silence the traceback details (using shell redirection) but I'm not sure that this is what I want to do as yet. Questions that this raised: Was I just unlucky enough to miss observing a traceback when I ran it interactively in the past, based on the changed item data returned? If tracebacks like this are expected/normal in the output, is that due to python, urlwatch or one of its dependent packages? Is cron's execution of programs fundamentally different from an interactive user in important ways? If so, what are they? Anything else I should be looking at on my system configuration that could be attributing to this issue? Thanks in advance for any insight or pointers to more details!
__________________
Summary: Solutions Architect, Networking, IaaS, DataSec, Un*x, Windows Realizes: “Culture eats technology for breakfast…” -Russ White Last edited by lenlynch; 10th June 2017 at 08:40 AM. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The Woman Who Captured Snowden | J65nko | News | 8 | 8th February 2015 07:57 PM |
cron newsyslog message | starbuck | FreeBSD General | 2 | 6th August 2008 07:33 PM |
Cron running but not working | stukov | Other BSD and UNIX/UNIX-like | 26 | 24th July 2008 01:17 PM |
Please help me automate getmail with cron | cssgalactic | FreeBSD General | 2 | 9th July 2008 10:13 PM |
Using sendmail in a cron job | erehwon | OpenBSD General | 6 | 15th May 2008 09:03 PM |