Changing filenames from Greeklish => Greek (subprocess complain)
Lele Gaifax
lele at metapensiero.it
Tue Jun 4 14:18:29 EDT 2013
Νικόλαος Κούρας <nikos.gr33k at gmail.com> writes:
> root at nikos [~]# [Tue Jun 04 19:50:16 2013] [error] [client 46.12.95.59] File "files.py", line 72
> [Tue Jun 04 19:50:16 2013] [error] [client 46.12.95.59] data = cur.fetchone() #URL is unique, so should only be one
> [Tue Jun 04 19:50:16 2013] [error] [client 46.12.95.59] ^
> [Tue Jun 04 19:50:16 2013] [error] [client 46.12.95.59] SyntaxError: invalid syntax
Some kind soul already said you the reason. What follows is the longest
way I could think to spot your error:
>>> from collections import Counter
>>> stmt = "cur.execute('''SELECT url FROM files WHERE url = %s''', ( fullpath, )"
>>> chars_count = Counter(stmt)
>>> print("Number of '(': %d" % chars_count['('])
>>> print("Number of ')': %d" % chars_count[')'])
Number of '(': 2
Number of ')': 1
ciao, lele.
--
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele at metapensiero.it | -- Fortunato Depero, 1929.
More information about the Python-list
mailing list