bitdruid / python-wayback-machine-downloader

Query and download archive.org as simple as possible.
MIT License
34 stars 2 forks source link

[BUG] near "(": syntax error #25

Closed Tencross-Sadachi closed 3 weeks ago

Tencross-Sadachi commented 3 weeks ago

AmazonLinux2 Python3.8.16

Describe I got 'near "(": syntax error' in SnapshotCollection.py. Any suggestion?

Snapshot to reproduce https://seesaawiki.jp/overlord

Command to reproduce waybackup -u https://seesaawiki.jp/overlord -c

Terminal output


<<< python-wayback-machine-downloader v2.0.2 >>>

No CDX file found to inject - querying snapshots...

Querying snapshots...
-----> seesaawiki.jp/overlord/*
download cdx   : 1.49MB [00:01, 824kB/s]

Inserting CDX data into database...
insert cdx     : 100%|██████████████████████████████████████████████████| 9575/9575 [00:03<00:00, 2974.91 l

Indexing snapshots...

Filtering current snapshots...
-------------------------
!-- Exception:
!-- File: ../../usr/local/lib/python3.8/site-packages/pywaybackup/SnapshotCollection.py
!-- Function: filter_current
!-- Line: 180
!-- Segment: cls.db.cursor.execute(
!-- Description: near "(": syntax error
-------------------------```
Tencross-Sadachi commented 3 weeks ago

No problem with --full option. But I'd like to get only the latest.

regards,

On 2024/11/06 水 16:58, bitdruid wrote:

does this error also appear if you actually downloaded some snapshots? can you have a try?

bitdruid commented 3 weeks ago

sure i will check that out as soon as possible. im a bit stressed because of my thesis but maybe on the weekend

bitdruid commented 3 weeks ago

so i cant reproduce. but could it be that ROW_NUMBER() is not included in the sqlite3 version shipped with python 3.6 ? i'm on 3.12.6... fast checkup online gave me the hint that required sqlite 3.25 should be part of at least python 3.8 (i see should be ok)

on which version are you? python import sqlite3 print(sqlite3.sqlite_version)

edit:

can you please give me your waybackup-error log ? it contains the full stacktrace. that may help. please check if any critical paths are present in the file and obscure them

Tencross-Sadachi commented 3 weeks ago

On my environment, sqlite3 is 3.7.17. Is this the cause?

# python
Python 3.8.16 (default, May 21 2024, 18:54:47)
[GCC 7.3.1 20180712 (Red Hat 7.3.1-17)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> print(sqlite3.sqlite_version)
3.7.17
>>>
Tencross-Sadachi commented 3 weeks ago

I updated the version of sqlite3 from 3.7 to 3.47(latest), then 'syntax error' is resolved! Thank you for your responce.