piholestatus icon indicating copy to clipboard operation
piholestatus copied to clipboard

'int' object has no attribute 'replace'

Open RobSheppard1976 opened this issue 7 years ago • 3 comments

Running this script on Ubuntu 17.04. Followed instructions, and getting this error:

pihole@pihole:/etc$ sudo ./piholestats.sh Traceback (most recent call last): File "./piholestats.sh", line 47, in domains_blocked = (API_out['domains_being_blocked']).replace(',', '') AttributeError: 'int' object has no attribute 'replace'

Any ideas?

RobSheppard1976 avatar Jul 04 '17 13:07 RobSheppard1976

I'm having the exact same issue on a Raspberry Pi 3 running Raspbian jessie. I've also tried running the script with Python 3, but that does not work either.

ghost avatar Jul 07 '17 15:07 ghost

Same issue here as well.

Have tried using this script (as well as the original on reddit) on python2 and python3 on the following hosts.

Ubuntu 16.04. Debian Stretch. ArchLinux

Same error each time.

aldrouil avatar Jul 19 '17 20:07 aldrouil

@aldrouil have a look at the code from the pull request #4 by @icetail. With his changes the script runs without any errors on my Raspberry.

ghost avatar Jul 22 '17 16:07 ghost