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

Unable to add a list of urls from a file #26

Closed thesatishk closed 4 years ago

thesatishk commented 4 years ago
┌──────────────────────────────────────────┐
│       π-hole 5 list tool  v0.5.0         │
└──────────────────────────────────────────┘
https://github.com/jessedp/pihole5-list-tool

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

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 block lists coming from? File | A file with urls of ? File to import /home/pi/Documents/blocklist.list Traceback (most recent call last): File "/usr/local/bin/pihole5-list-tool", line 10, in sys.exit(main()) File "/usr/local/lib/python3.7/dist-packages/ph5lt.py", line 113, in main process_blocklists(db_file) File "/usr/local/lib/python3.7/dist-packages/ph5lt.py", line 156, in process_blocklists import_list = utils.process_lines(import_file, f"File: {fname}") File "/usr/local/lib/python3.7/dist-packages/utils.py", line 39, in process_lines for line in data.split("\n"): AttributeError: '_io.TextIOWrapper' object has no attribute 'split'

jessedp commented 4 years ago

This should be fixed in v0.5.1 . Do sudo pip3 install pihole5-list-tool --upgrade and give it another shot.