cdchris12 / UDM-DNS-Fix

A simple script to provide basic DHCP hostname resolution in the latest UniFi Dream Machine Pro firmware.
Apache License 2.0
74 stars 8 forks source link

Script not working #10

Open amdmaxe opened 1 year ago

amdmaxe commented 1 year ago

I have set up the script on a Debian 11 system. When I run it with customized IPs and passwords, I encounter the following error. I use a local admin as the user on the UDM.

Getting host information... Creating API session... Logging into the controller... Login successful! Getting a list of clients and IPs... Traceback (most recent call last): File "/home/lokal_admin/UDM-DNS-Fix/./update-udmpro-dns.py", line 239, in main() File "/home/lokal_admin/UDM-DNS-Fix/./update-udmpro-dns.py", line 206, in main for c in get_clients(args.baseurl, args.username, args.password, args.site, args.fixed_only, args.verbose): File "/home/lokal_admin/UDM-DNS-Fix/./update-udmpro-dns.py", line 88, in get_clients fqdn = build_fqdn(c, networks) File "/home/lokal_admin/UDM-DNS-Fix/./update-udmpro-dns.py", line 54, in build_fqdn if client['network_id'] in networks: KeyError: 'network_id'

cdchris12 commented 1 year ago

I've not seen this issue previously... Can you give me the string you used to launch this script (with the passwords redacted), please?

amdmaxe commented 1 year ago

Hi, I'm using the following string from GitHub.

./update-udmpro-dns.py -b https://172.16.0.1:443 -p -u -su root -sp -sa 172.16.0.1 -f -vvv

I'm using a fresh install of Ubuntu 22.04.3 LTS. I installed git and pip to download and install the requirements. Login via UI is working with and . Login via SSH is working too with root and the . My password are in quotes. For example 'safe123!'

Brokenpoet commented 6 months ago

Ran into the exact same error running from the command line as above. Linux Mint 21.3.