tiredofit / docker-traefik-cloudflare-companion

Automatically Create CNAME records for containers served by Traefik
MIT License
351 stars 62 forks source link

SyntaxError: invalid syntax. Perhaps you forgot a comma? #106

Open burnbrigther opened 1 week ago

burnbrigther commented 1 week ago

Summary

In latest version, new error introduced.

2024-06-24T18:31:52.264662694Z SyntaxError: invalid syntax. Perhaps you forgot a comma?
2024-06-24T18:31:53.303132972Z 2024-06-24.11:31:53 [STARTING] ** [traefik-cloudflare-companion] [51] Starting Traefik Cloudflare Companion
2024-06-24T18:31:53.318834335Z   File "/usr/sbin/cloudflare-companion", line 183
2024-06-24T18:31:53.318854618Z     u'proxied': domain_info['proxied']
2024-06-24T18:31:53.318859114Z                 ^^^^^^^^^^^^^^^^^^^^^^

Steps to reproduce

  1. Install latest update on docker (docker container pull)
  2. Start with new image
  3. Check logs

What is the expected correct behavior?

No error, functionality restored. Updates are still not working.

Relevant logs and/or screenshots

See above

Environment

docker on a privileged VM Latest version of cf-companion

Any logs | docker-compose.yml ``` services: # Cloudflare-Companion - Automatic CNAME DNS Creation cf-companion: container_name: cf-companion image: tiredofit/traefik-cloudflare-companion:latest restart: always profiles: ["core", "security", "all"] networks: - socket_proxy volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: - TIMEZONE=$TZ - TRAEFIK_VERSION=2 - CF_TOKEN=$CLOUDFLARE_SUPER_API_KEY # Same as traefik - TARGET_DOMAIN=$DOMAINNAME_1 - DOMAIN1=$DOMAINNAME_1 - DOMAIN1_ZONE_ID=$CLOUDFLARE_ZONEID # Copy from Cloudflare Overview page - DOMAIN1_PROXIED=TRUE labels: # Add hosts specified in rules here to force cf-companion to create the CNAMEs # Since cf-companion creates CNAMEs based on host rules, this a workaround for non-docker/external apps # - "traefik.http.routers.cf-companion-rtr.rule=Host(`my-host.$DOMAINNAME_1`) || Host(`my-host.$DOMAINNAME_2`)" - "traefik.http.routers.cf-companion-rtr.rule=Host(`my-host.$DOMAINNAME_1`)" - "diun.enable=true" ``` ERROR: ``` SyntaxError: invalid syntax. Perhaps you forgot a comma? 2024-06-24.11:37:21 [STARTING] ** [traefik-cloudflare-companion] [68] Starting Traefik Cloudflare Companion File "/usr/sbin/cloudflare-companion", line 183 u'proxied': domain_info['proxied'] ^^^^^^^^^^^^^^^^^^^^^^ ```

I tried both single domain and dual-domain configuration, as shown in the commented configuration code with same resulting error.

Possible fixes

tiredofit commented 1 week ago

Thanks for the report - Definitely a comma. 7.3.1 resolves and is building as I write this.

burnbrigther commented 1 week ago

Thank you for fixing this.

rdgerken commented 2 days ago

I can confirm that 7.3.1 fixes this issue - however, the docker latest tag is still mapped to 7.3.0. Perhaps this was intentional? If so, please disregard. Thanks for fixing!