Solved Cron and python software.

rigoletto@

Developer
Hello!

I am using deskutils/py-vdirsyncer to synchronize CardDAV stuff and it works well from command line, but I get those error when I run it ( vdirsyncer sync ) from a cron(8) job. Should I set something?

Python:
Traceback (most recent call last):
  File "/usr/local/bin/vdirsyncer", line 11, in <module>
    load_entry_point('vdirsyncer==0.16.3', 'console_scripts', 'vdirsyncer')()
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/click/core.py", line 676, in main
    _verify_python3_env()
  File "/usr/local/lib/python3.6/site-packages/click/_unicodefun.py", line 118, in
+_verify_python3_env
    'for mitigation steps.' + extra)
RuntimeError: Click will abort further execution because Python 3 was configured to use ASCII as
+encoding for the environment.  Consult http://click.pocoo.org/python3/for mitigation steps.

Thanks!
 
Not enough info to go on.

Are you using the same user account for both the manual run and the cron job? Also: how did you configure the cron job exactly, can you share the entry?

(edit): Ninja'd :) nice to see you fixed it.
 
Just for the sake of the transparency, I was using the same account, and the cron job was just: @hourly vdirsyncer sync, but changing it to @hourly LANG=en_US.UTF-8 vdirsyncer sync solved.

Thanks!
 
Back
Top