Error: TypeError: argument of type 'int' is not iterable

Get help with all aspects of SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
denis300
Newbie
Newbie
Posts: 1
Joined: February 6th, 2017, 7:49 pm

Error: TypeError: argument of type 'int' is not iterable

Post by denis300 »

Does anyone know how to solve this? I assume i have to change something on my machine (running gentoo)

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 iterable

full 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 ips

SOLVED: culprit was ::1 aliased to localhost in /etc/hosts
User avatar
sander
Release Testers
Release Testers
Posts: 9429
Joined: January 22nd, 2008, 2:22 pm

Re: Error starting

Post by sander »

So this happens on Gentoo Linux ... ?

Please run this:

Code: Select all

python2.7 -c "import socket; print socket.getaddrinfo('localhost')"

Code: Select all

python2.7 -c "import socket; print socket.getaddrinfo('localhost', None, socket.AF_INET)"
... and post the output here

The same was reported by a FreeBSD user here: https://forums.sabnzbd.org/viewtopic.php?f=23&t=22392
I think we found a real solution in SABnzbd.
Post Reply