-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 26/11/12 05:43, Patrick Olsen wrote:
> I'm having some issues with Firefox and pysqlite2. Both versions are
> running Python 2.7 from what I can tell.
>
> *If I run this on Linux:*
>
> $ python firefox.py -d /home/<username>/Desktop/ -b Firefox -p
> bookmark Traceback (most recent call last): File
> "barff_0_rev3_firefox.py", line 241, in <module> main() File
> "barff_0_rev3_firefox.py", line 237, in main bookmark =
> browser.get_bookmarks() File "barff_0_rev3_firefox.py", line 154, in
> get_bookmarks cursor.execute('SELECT
> datetime(moz_bookmarks.dateAdded/1000000, \'unixepoch\') AS \'Date
> Added\', moz_bookmarks.title AS \'Title\', moz_places.url AS \'URL\',
> moz_places.visit_count AS \'Count\' FROM moz_bookmarks, moz_places
> WHERE
moz_places.id =
moz_bookmarks.fk ORDER BY moz_bookmarks.dateAdded
> ASC')
You left out the rest of the stack trace. From the subject line I'd guess
this is because the file is not a database. The alternative is you are
using an old version of SQLite.
> for (dateAdded, title, url, visit_count) in cursor.fetchall():
There is no need for the fetchall. The cursor is an iterator already.
Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iEYEARECAAYFAlCzqp4ACgkQmOOfHg372QQF5wCgtaH/WS1RoYk3GCR/BaW3KRxe
87AAoJhN+L/glNX6UcfxZ0Ym4JgMXGxq
=8yqW
-----END PGP SIGNATURE-----