Re: ValueError: zero length field name in format - Running under Python 2.7.3?

2013-11-04 Thread Victor Hooi
Hi, You're right - it was sudo playing up with the virtualenv. The script was in /opt, so I was testing with sudo to get it to run. I should have setup a service account, and tested it with that =). $ python sync_bexdb.py 2.7.3 (default, Jan 7 2013, 11:52:52) [GCC 4.4.6 20120305 (Red Hat 4.4.6

Re: ValueError: zero length field name in format - Running under Python 2.7.3?

2013-11-04 Thread Chris Angelico
On Tue, Nov 5, 2013 at 9:33 AM, Victor Hooi wrote: > However, when I run this line, I get the following error: > > Traceback (most recent call last): > File "my_script.py", line 25, in > LOG_FILENAME = > 'my_something_{}.log'.format(datetime.now().strftime('%Y-%d-%m_%H.%M.%S'))

ValueError: zero length field name in format - Running under Python 2.7.3?

2013-11-04 Thread Victor Hooi
Hi, I have a Python script that's using a format string without positional specifiers. I.e.: LOG_FILENAME = 'my_something_{}.log'.format(datetime.now().strftime('%Y-%d-%m_%H.%M.%S')) I'm running this from within a virtualenv, running under Python 2.7.3. $ python -V Python 2.7.3