Skip to content Skip to sidebar Skip to footer

Python: Why Do I Get This Exception From Babel When Calling From Cron?

I'm getting this exception thrown from within the Python Babel package when my script calls a Babel function. The thing is when I run it from the command line it works okay. Howeve

Solution 1:

Babel was unable to detect a default locale (for LC_TIME) because cron sets fewer environment variables.

You could set this explicitely babel.dates.LC_TIME = Locale.parse('en_US'). Also check out Babel 0.9.6 - there we some fixes in default locale detection.

Post a Comment for "Python: Why Do I Get This Exception From Babel When Calling From Cron?"