jessedp / pihole5-list-tool

A tool for quickly and easily bulk adding allow and ad/block lists to a Pi-hole 5 installation
MIT License
312 stars 18 forks source link

Issue when trying to add whitelists #19

Closed dgrant closed 4 years ago

dgrant commented 4 years ago

Environment

pihole5-list-tool 0.4.7

OS Raspbian 10

Python 3.7.3

Using Docker? No

Issue Details

Output:

    ┌──────────────────────────────────────────┐
    │       π-hole 5 list tool  v0.4.7         │
    └──────────────────────────────────────────┘
    https://github.com/jessedp/pihole5-list-tool

docker not found running, continuing...
? Gravity Db to Update:  /etc/pihole/gravity.db
? Add Blacklists or Whitelists?  Whitelists

    Do not hit ENTER or Y if a step seems to hang!
    Use CTRL+C if you're sure it's hung and report it.

? Where are the whitelists coming from?  AnudeepND | Whitelist+Optional :
? Add 337 white lists to /etc/pihole/gravity.db?  Yes
0 whitelists added! 1 already existed.
Traceback (most recent call last):
  File "/usr/local/bin/pihole5-list-tool", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.7/dist-packages/ph5lt.py", line 116, in main
    process_whitelists(db_file)
  File "/usr/local/lib/python3.7/dist-packages/ph5lt.py", line 234, in process_whitelists
    "SELECT COUNT(*) FROM domainlist WHERE domain = ?", (item["url"],)
sqlite3.ProgrammingError: Cannot operate on a closed cursor.
jessedp commented 4 years ago

fixed in v0.4.8

dgrant commented 4 years ago

Thanks!