Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 10th June 2017
lenlynch lenlynch is offline
New User
Join Date: Jan 2016
Location: Midwest North America
Posts: 3
Default 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.

Traceback (most recent call last):
  File "/usr/local/bin/urlwatch", line 101, in <module>
  File "/usr/local/lib/python3.6/site-packages/urlwatch/command.py", line 167, in run
  File "/usr/local/lib/python3.6/site-packages/urlwatch/main.py", line 96, in close
  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
UnicodeEncodeError: 'ascii' codec can't encode character '\xdc' in position 2: ordinal not in range(128)
This traceback appears to be complaining about unicode characters being returned instead of ascii characters for the checked item? Have I got that right?

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.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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

All times are GMT. The time now is 09:43 PM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick