Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation not working due to "{path_pihole} was not found" #37

Closed
Darth-Igi opened this issue Oct 27, 2020 · 3 comments
Closed

Installation not working due to "{path_pihole} was not found" #37

Darth-Igi opened this issue Oct 27, 2020 · 3 comments

Comments

@Darth-Igi
Copy link

In install.py in line 39 is the follwing written: path_pihole = r'/etc/pihole'.
The "r" causes an error and breaks the installation.

I removed the "r" and run the script locally without any error.

@mmotti
Copy link
Owner

mmotti commented Oct 29, 2020

That's interesting - I have never heard of that one before.

What is your Python version? The r is simply saying to treat the directory as a literal string so as to treat the backslashes as backslashes.

@Darth-Igi
Copy link
Author

I believe that :-)
I used the current version 3.9.0.

@mmotti
Copy link
Owner

mmotti commented Oct 29, 2020

Thanks for confirming - My test installation (Ubuntu Server) is @ 3.8.3 i think.

Will try update it to 3.9 and see if I can replicate this but I am not hopeful as I wouldn't have thought they'd have messed around with the literal strings.

Do you know specifically what error occurs?

Cheers!

Edit: Seems to work OK for me running Python 3.9

mmotti@ubuntu-server:~$ curl -sSl https://raw.githubusercontent.com/mmotti/pihole-regex/master/install.py | sudo python3.9
[i] Pi-hole path exists
[i] Write access to /etc/pihole verified
[i] DB detected
[i] Fetching: https://raw.githubusercontent.com/mmotti/pihole-regex/master/regex.list
[i] 14 regexps collected from https://raw.githubusercontent.com/mmotti/pihole-regex/master/regex.list
[i] Connecting to /etc/pihole/gravity.db
[i] Adding / updating regexps in the DB
[i] Identifying obsolete regexps
[i] Restarting Pi-hole
[i] Done - Please see your installed regexps below

^(.+[_.-])?adse?rv(er?|ice)?s?[0-9]*[_.-]
^(.+[_.-])?telemetry[_.-]
^ad([sxv]?[0-9]*|system)[_.-]([^.[:space:]]+\.){1,}|[_.-]ad([sxv]?[0-9]*|system)[_.-]
^adim(age|g)s?[0-9]*[_.-]
^adtrack(er|ing)?[0-9]*[_.-]
^advert(s|is(ing|ements?))?[0-9]*[_.-]
^aff(iliat(es?|ion))?[_.-]
^analytics?[_.-]
^banners?[_.-]
^beacons?[0-9]*[_.-]
^count(ers?)?[0-9]*[_.-]
^mads\.
^pixels?[-.]
^stat(s|istics)?[0-9]*[_.-]

@mmotti mmotti closed this as completed Nov 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants