klmr92 / uguu

Automatically exported from code.google.com/p/uguu
Other
0 stars 1 forks source link

spider.py crashes with query finished at "VALUES" keyword #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Sometimes spider.py crashes. Log contains the following lines:

---------------------------------------------------------------------
[Fri Feb 19 06:19:01 2010] Scanning smb://somehostname (IP) ...
[Fri Feb 19 06:19:01 2010] Scanning smb://somehostname failed with a crash.
Something unexpected happened. Exception trace:
Traceback (most recent call last):
  File "/home/uguu/search/bin/spider.py", line 211, in <module>
    scan_share(db, id, proto, host, port, hash, command)
  File "/home/uguu/search/bin/spider.py", line 164, in scan_share
    qcache.allcommit()
  File "/home/uguu/search/bin/spider.py", line 74, in allcommit
    self.fcommit()
  File "/home/uguu/search/bin/spider.py", line 72, in fcommit
    self.commit()
  File "/home/uguu/search/bin/spider.py", line 63, in commit
    self.cursor.execute(string.join(self.query,";"))
  File "/usr/lib/python2.5/site-packages/psycopg2/extras.py", line 88, in
execute
    return _cursor.execute(self, query, vars, async)
ProgrammingError: syntax error at end of input
LINE 1: ...ath_id, pathfile_id, sharedir_id, size, filename_id) VALUES
                                                                       ^

Traceback (most recent call last):
  File "/home/uguu/search/bin/spider.py", line 199, in <module>
    """)
  File "/usr/lib/python2.5/site-packages/psycopg2/extras.py", line 88, in
execute
    return _cursor.execute(self, query, vars, async)
psycopg2.InternalError: current transaction is aborted, commands ignored
until end of transaction block
---------------------------------------------------------------------

May be, PsycoCache::fcommit should be extended with something like:
if len(self.fquery) == 0: return

Original issue reported on code.google.com by radist...@gmail.com on 19 Feb 2010 at 3:40

GoogleCodeExporter commented 9 years ago
checkout revision b6a93f0fb6e9

Original comment by ruslan.savchenko on 19 Feb 2010 at 5:38

GoogleCodeExporter commented 9 years ago
Seems like fixed, I didn't saw any crashes for the last hours.

Original comment by radist...@gmail.com on 19 Feb 2010 at 11:19