On this page
ipaddress.AddressValueError
Up: ipaddress | Next: ipaddress.collapse_addresses
Rel: ipaddress.collapse_addresses, ipaddress.get_mixed_type_key, ipaddress.ip_address, ipaddress.ip_interface
Ref: docs.python.org โ ipaddress.AddressValueError
Tags: #public #python3 #stdlib #ipaddress
Import
import ipaddress
from ipaddress import AddressValueError
Signature & Overview
ipaddress.AddressValueError(...)
A Value Error related to the address.
Methods & Attributes
AddressValueError.add_note(self, note, /)โ Add a note to the exceptionAddressValueError.with_traceback(self, tb, /)โ Set self.traceback to tb and return self.
Usage
import ipaddress
try:
ipaddress.IPv4Address("999.0.0.1")
except ipaddress.AddressValueError:
assert issubclass(ipaddress.AddressValueError, ValueError)
Gotchas
- Subclass of
ValueError: Raised on malformed IPv4/IPv6 addresses.
REPL Inspect
from ipaddress import AddressValueError
help(AddressValueError)
Linked from
- tuts/python3/stdlib_module/ipaddress
- tuts/python3/stdlib_module/ipaddress/collapse_addresses
- tuts/python3/stdlib_module/ipaddress/get_mixed_type_key
- tuts/python3/stdlib_module/ipaddress/ip_address
- tuts/python3/stdlib_module/ipaddress/ip_interface
- tuts/python3/stdlib_module/ipaddress/ip_network
- tuts/python3/stdlib_module/ipaddress/IPv4Address
- tuts/python3/stdlib_module/ipaddress/IPv4Interface
- tuts/python3/stdlib_module/ipaddress/IPv4Network
- tuts/python3/stdlib_module/ipaddress/IPv6Address
- tuts/python3/stdlib_module/ipaddress/IPv6Interface
- tuts/python3/stdlib_module/ipaddress/IPv6Network
- tuts/python3/stdlib_module/ipaddress/NetmaskValueError
- tuts/python3/stdlib_module/ipaddress/summarize_address_range
- tuts/python3/stdlib_module/ipaddress/v4_int_to_packed
- tuts/python3/stdlib_module/ipaddress/v6_int_to_packed
Related notes
- tuts/python3/stdlib_module/ipaddress/collapse_addresses Linked here; links to this page; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/get_mixed_type_key Linked here; links to this page; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/ip_address Linked here; links to this page; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/ip_interface Linked here; links to this page; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ipaddress/ip_network links to this page; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/IPv4Address links to this page; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/IPv4Interface links to this page; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/IPv4Network links to this page; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/IPv6Address links to this page; shared tags: #ipaddress, #stdlib