Skip to content

IPRangeList() => TypeError: expected string or bytes-like object, got 'list' #26

Description

@iPoetDev

I am optionally using this (to time save a local DHCP address allocation and guess work) and I get this when I run:

django-admin check auth admin as I am configuring the Admin Site for Development & Local environments.

 File "D:\Code\Code Institute\dash-and-do-github\dash_and_do\settings\__init__.py", line 7, 
    in <module> from .development import *
  File "D:\Code\Code Institute\dash-and-do-github\dash_and_do\settings\development.py", line 53, 
    in <module> INTERNAL_IPS = IpRangeList(['127.0.0.1/24', '192.168.0.0/16'])
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Code\Code Institute\dash-and-do-github\venv\Lib\site-packages\iptools\__init__.py", line 414, 
    in __init__ self.ips = tuple(map(IpRange, args))
                    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Code\Code Institute\dash-and-do-github\venv\Lib\site-packages\iptools\__init__.py", line 141, 
     in __init__ elif ipv4.validate_cidr(start):
                     ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\Code\Code Institute\dash-and-do-github\venv\Lib\site-packages\iptools\ipv4.py", line 257, 
     in validate_cidr if _CIDR_RE.match(s):
                              ^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'list'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions