Skip links

‘IPAddress’ object has no attribute ‘netmask_bits’ in build_vars conversion

If when running the script, you get the following error:

AttributeError: ‘IPAddress’ object has no attribute ‘netmask_bits’

This is likely because the Python “netaddr” package is old on your system.  The package can be upgraded using:

$ pip install –upgrade netaddr

You can check the version using the following command.  It should be at least version 0.7.19:

$ pip freeze | grep netaddr