timothymiller / cloudflare-ddns

🎉🌩ī¸ Dynamic DNS (DDNS) service based on Cloudflare! Access your home network remotely via a custom domain name without a static IP!
https://timknowsbest.com/free-dynamic-dns
GNU General Public License v3.0
3.01k stars 316 forks source link

Broken image after code cleanup #108

Closed aykonsvk closed 1 year ago

aykonsvk commented 2 years ago

Describe the bug The code is getting incorrect values from config.

cloudflare-ddns      | 🕰ī¸ Updating IPv4 (A) records every 5 minutes
cloudflare-ddns      | Traceback (most recent call last):
cloudflare-ddns      |   File "/cloudflare-ddns.py", line 227, in <module>
cloudflare-ddns      |     updateIPs(getIPs())
cloudflare-ddns      |   File "/cloudflare-ddns.py", line 181, in updateIPs
cloudflare-ddns      |     commitRecord(ip)
cloudflare-ddns      |   File "/cloudflare-ddns.py", line 102, in commitRecord
cloudflare-ddns      |     subdomain = subdomain.lower().strip()
cloudflare-ddns      | AttributeError: 'dict' object has no attribute 'lower'
cloudflare-ddns exited with code 1
{
  "cloudflare": [
    {
      "authentication": {
        "api_token": "token"
      },
      "zone_id": "zone",
      "subdomains": [
        {
          "name": "first",
          "proxied": false
        },
        {
          "name": "second",
          "proxied": true
        }
      ]
    }
  ],
  "a": true,
  "aaaa": false,
  "purgeUnknownRecords": false
}

To Reproduce Steps to reproduce the behavior:

  1. get newest image from docker hub
  2. use config above
  3. error is present

Expected behavior The application should parse and update dns

Desktop (please complete the following information):

shortgame11 commented 1 year ago

Did you solve this?

timothymiller commented 1 year ago

@shortgame11 Yes this is solved.