Error: TypeError: argument of type 'int' is not iterable
Posted: February 6th, 2017, 7:50 pm
Does anyone know how to solve this? I assume i have to change something on my machine (running gentoo)
full code:
SOLVED: culprit was ::1 aliased to localhost in /etc/hosts
Code: Select all
Traceback (most recent call last):
File "/usr/share/sabnzbd/SABnzbd.py", line 1788, in <module>
main()
File "/usr/share/sabnzbd/SABnzbd.py", line 1335, in main
hosts = all_localhosts()
File "/usr/share/sabnzbd/SABnzbd.py", line 496, in all_localhosts
if item not in ips and ('::1' not in item or sabnzbd.cfg.ipv6_hosting()):
TypeError: argument of type 'int' is not iterablefull code:
Code: Select all
def all_localhosts():
""" Return all unique values of localhost in order of preference """
ips = ['127.0.0.1']
try:
# Check whether IPv6 is available and enabled
info = socket.getaddrinfo('::1', None)
af, socktype, proto, _canonname, _sa = info[0]
s = socket.socket(af, socktype, proto)
s.close()
except socket.error:
return ips
try:
info = socket.getaddrinfo('localhost', None)
except:
# localhost does not resolve
return ips
ips = []
for item in info:
item = item[4][0]
# Only return IPv6 when enabled
if item not in ips and ('::1' not in item or sabnzbd.cfg.ipv6_hosting()):
ips.append(item)
return ipsSOLVED: culprit was ::1 aliased to localhost in /etc/hosts