xirixiz / dsmr-reader-docker

DSMR Reader in Docker.
https://hub.docker.com/r/xirixiz/dsmr-reader-docker
112 stars 33 forks source link

SyntaxWarning: invalid escape sequence '\d' #346

Closed jicho closed 4 months ago

jicho commented 4 months ago

Support guidelines

I've found an issue and checked that ...

Description

Bij het starten van de laatste versie van dsmr-reader-docker kwam deze melding voorbij in de docker CLI logs:

dsmr-reader  | /app/dsmr_parser/parsers.py:41: SyntaxWarning: invalid escape sequence '\d'
dsmr-reader  |   """

Deze lijkt veroorzaakt te worden doordat Python 3.12.x gebruikt wordt terwijl DSMR-reader hier nog geen ondersteuning voor heeft... Is het mogelijk om de container met Python 3.11.x te laten draaien totdat Python 3.12 ondersteuning aanwezig is?

In https://github.com/dsmrreader/dsmr-reader/issues/1965 wordt aangegeven dat de Python versie een grote kans is dat die de melding veroorzaakt.

Expected behaviour

Geen Python error en dat er gebruik gemaakt wordt van een door DSMR-reader ondersteunde Python versie om zo eventuele problemen te voorkomen :)

Actual behaviour

Een Python error

Steps to reproduce

  1. Update de container naar de laatste versie
  2. Start de container
  3. Error verschijnt

De melding verschijnt alleen bij de eerste keer na een versie (forced) pull van de container i.c.m. het starten ervan. Bij herstarts is er niets te zien.

Docker info

Client: Docker Engine - Community
 Version:    24.0.7
 Context:    default
 Debug Mode: false
 Plugins:
  compose: Docker Compose (Docker Inc.)
    Version:  v2.21.0
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 16
  Running: 16
  Paused: 0
  Stopped: 0
 Images: 46
 Server Version: 20.10.23
 Storage Driver: btrfs
  Build Version: Btrfs v4.0
  Library Version: 101
 Logging Driver: db
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs db fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b23a38************************eb8d88
 runc version: 5***********d
 init version: e*****************0
 Security Options:
  apparmor
 Kernel Version: 4.4.302+
 Operating System: DiskStation
 (containerized)
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 5.65GiB
 Name: **************
 ID: ***************
 Docker Root Dir: /volume1/@docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No kernel memory TCP limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No blkio throttle.read_bps_device support
WARNING: No blkio throttle.write_bps_device support
WARNING: No blkio throttle.read_iops_device support
WARNING: No blkio throttle.write_iops_device support

Version

Lijkt me niet nodig i.v.m. een Python versie

Docker compose

Lijkt me niet nodig i.v.m. een Python versie

Container logs

[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-set-app-defaults: executing... 

[ INFO ] DSMR Reader Reader release: 5.11.0

[ INFO ] DSMR Reader Reader Docker release: 2024.02.21

[ INFO ] Ensure permissions...

[ INFO ] Setting architecture requirements...

[ INFO ] X64 Architecture

[ INFO ] Verifying if the DSMR Reader web credential variables have been set...

[ INFO ] Verifying database connectivity to host: postgres with port: 5432...
Connection to postgres (172.20.0.3) 5432 port [tcp/postgresql] succeeded!

[ INFO ] Database connectivity successfully verified!

[ INFO ] Running post configuration...
/app/dsmr_parser/parsers.py:41: SyntaxWarning: invalid escape sequence '\d'
  """
Operations to perform:
  Apply all migrations: admin, auth, contenttypes, dsmr_api, dsmr_backend, dsmr_backup, dsmr_consumption, dsmr_datalogger, dsmr_dropbox, dsmr_frontend, dsmr_influxdb, dsmr_mindergas, dsmr_mqtt, dsmr_notification, dsmr_pvoutput, dsmr_stats, dsmr_weather, sessions
Running migrations:
  No migrations to apply.
559 static files copied to '/var/www/dsmrreader/static'.

Additional info

No response

xirixiz commented 4 months ago

Ah too bad. Just fixed it.... the backery for a new Docker image release is running :)

dennissiemensma commented 4 months ago

Support voor 3.12 volgt nog wel een keer hoor, maar het is momenteel gelocked op Django daarmee (en ook oude versies) en ook weer andere zaken.

https://github.com/dsmrreader/dsmr-reader/issues/1965#issuecomment-1961716596

xirixiz commented 4 months ago

Maakt ook niet zoveel uit. Iemand anders had een PR ingeschoten, en ik heb daar niet naar gekeken. Het is iig opgelost πŸ‘πŸ»

jicho commented 4 months ago

πŸ‘ de melding is, zoals verwacht, niet meer aanwezig.

Dank voor het aanpassen!

xirixiz commented 4 months ago

Hi I've created a S6 v3 overlay Docker image (was running on outdates S6 v2 overlay). I'm currently not using DSMR reader myself, so I`m unable to do some proper testing. Would you mind testing ghcr.io/xirixiz/dsmr-reader-docker:development and share the output?

It's on the pre_release branch now. If everything is working fine, I`ll merge the changes to the main branch

jicho commented 4 months ago

Hi, this is what I get when I run ghcr.io/xirixiz/dsmr-reader-docker:development:

2024-02-27T15:35:55.116258772Z s6-rc: info: service s6rc-oneshot-runner: starting
2024-02-27T15:35:55.132372365Z s6-rc: info: service s6rc-oneshot-runner successfully started
2024-02-27T15:35:55.134659845Z s6-rc: info: service fix-attrs: starting
2024-02-27T15:35:55.134843503Z s6-rc: info: service docker-entrypoint: starting
2024-02-27T15:35:55.172510307Z s6-rc: info: service fix-attrs successfully started
2024-02-27T15:35:55.172797789Z s6-rc: info: service legacy-cont-init: starting
2024-02-27T15:35:55.178617941Z s6-rc: info: service legacy-cont-init successfully started
2024-02-27T15:35:55.262596285Z 
[ INFO ] DSMR Reader Reader release: 5.11.0
2024-02-27T15:35:55.262875682Z 
[ INFO ] DSMR Reader Reader Docker release: 2024.02.21
2024-02-27T15:35:56.304512100Z 
2024-02-27T15:35:56.305047179Z     ───────────────────────────────────────────────────
2024-02-27T15:35:56.305122553Z      ___  ___ __  __ ___   ___             _
2024-02-27T15:35:56.305172438Z     |   \/ __|  \/  | _ \ | _ \___ __ _ __| |___ _ _
2024-02-27T15:35:56.305223329Z     | |) \__ \ |\/| |   / |   / -_) _` / _` / -_) '_|
2024-02-27T15:35:56.305265329Z     |___/|___/_|  |_|_|_\ |_|_\___\__,_\__,_\___|_|
2024-02-27T15:35:56.305334264Z                  __           _
2024-02-27T15:35:56.305375617Z                 |   \ ___  __| |_____ _ _
2024-02-27T15:35:56.305417846Z                 | |) / _ \/ _| / / -_) '_|
2024-02-27T15:35:56.305593244Z                 |___/\___/\__|_\_\___|_|
2024-02-27T15:35:56.305651538Z 
2024-02-27T15:35:56.305695166Z     DSMR-protocol reader, telegram data storage and
2024-02-27T15:35:56.305766603Z             energy consumption visualizer.
2024-02-27T15:35:56.305819042Z 
2024-02-27T15:35:56.305875480Z     ───────────────────────────────────────────────────
2024-02-27T15:35:56.305926214Z     User UID: 803
2024-02-27T15:35:56.305978198Z     User GID: 803
2024-02-27T15:35:56.306026075Z     ───────────────────────────────────────────────────
2024-02-27T15:35:56.306074320Z     
2024-02-27T15:35:56.309397605Z 
[ INFO ] Ensure permissions...
2024-02-27T15:35:56.368234824Z 
[ INFO ] Setting architecture requirements...
2024-02-27T15:35:56.413243045Z 
[ INFO ] X64 Architecture
2024-02-27T15:35:56.413435666Z 
[ INFO ] Verifying if the DSMR Reader web credential variables have been set...
2024-02-27T15:35:56.413525805Z 
[ INFO ] Verifying database connectivity to host: postgres with port: 5432...
2024-02-27T15:35:56.442961676Z Connection to postgres (172.20.0.3) 5432 port [tcp/postgresql] succeeded!
2024-02-27T15:35:56.443539305Z 
[ INFO ] Database connectivity successfully verified!
2024-02-27T15:35:56.444042301Z 
[ INFO ] Running post configuration...
2024-02-27T15:36:07.423036470Z Operations to perform:
2024-02-27T15:36:07.423768987Z   Apply all migrations: admin, auth, contenttypes, dsmr_api, dsmr_backend, dsmr_backup, dsmr_consumption, dsmr_datalogger, dsmr_dropbox, dsmr_frontend, dsmr_influxdb, dsmr_mindergas, dsmr_mqtt, dsmr_notification, dsmr_pvoutput, dsmr_stats, dsmr_weather, sessions
2024-02-27T15:36:07.423985965Z Running migrations:
2024-02-27T15:36:07.424051064Z   No migrations to apply.
2024-02-27T15:36:11.546907689Z 
2024-02-27T15:36:11.547657165Z 559 static files copied to '/var/www/dsmrreader/static'.
2024-02-27T15:36:15.406345712Z Updating password of superuser "**********"
2024-02-27T15:36:15.407108469Z Deactivating any other existing superusers
2024-02-27T15:36:15.966018992Z 
[ INFO ] Checking for CLIENT CERTIFICATE AUTHENTICATION configuration...
2024-02-27T15:36:15.966382238Z 
[ INFO ] ENABLE_CLIENTCERT_AUTH is disabled, nothing to see here. Continuing...
2024-02-27T15:36:15.966600953Z 
[ INFO ] Checking for NGINX SSL configuration...
2024-02-27T15:36:15.966695276Z 
[ INFO ] ENABLE_NGINX_SSL is disabled, nothing to see here. Continuing...
2024-02-27T15:36:15.966767853Z 
[ INFO ] Checking for HTTP AUTHENTICATION configuration...
2024-02-27T15:36:15.966890127Z 
[ INFO ] ENABLE_HTTP_AUTH is disabled, nothing to see here. Continuing...
2024-02-27T15:36:15.984186308Z 
[ INFO ] Configuring DSMR Reader to run all processes in a single container with a serial or ipv4 datalogger...
2024-02-27T15:36:15.985201256Z 
[ INFO ] Using an ipv4 network socket for the datalogger...
2024-02-27T15:36:15.986332933Z 
[ INFO ] Adding ipv4 input method configuration settings...
2024-02-27T15:36:16.018208487Z s6-rc: info: service docker-entrypoint successfully started
2024-02-27T15:36:16.031717431Z s6-rc: info: service svc-dsmr-webinterface: starting
2024-02-27T15:36:16.032593858Z s6-rc: info: service svc-dsmr-remote-datalogger: starting
2024-02-27T15:36:16.033596805Z s6-rc: info: service svc-dsmr-datalogger: starting
2024-02-27T15:36:16.033824162Z s6-rc: info: service svc-dsmr-backend: starting
2024-02-27T15:36:16.050579723Z s6-rc: info: service svc-dsmr-remote-datalogger successfully started
2024-02-27T15:36:16.054886043Z s6-rc: info: service svc-dsmr-datalogger successfully started
2024-02-27T15:36:16.056293368Z s6-rc: info: service svc-dsmr-backend successfully started
2024-02-27T15:36:16.056881053Z s6-rc: info: service svc-dsmr-webinterface successfully started
2024-02-27T15:36:16.064151632Z s6-rc: info: service legacy-services: starting
2024-02-27T15:36:16.074309740Z s6-rc: info: service legacy-services successfully started
2024-02-27T15:36:16.085387067Z Starting DSMR Reader - datalogger...
2024-02-27T15:36:16.086359249Z Starting DSMR Reader - webinterface...
2024-02-27T15:36:16.087557057Z Starting DSMR Reader - backend...
2024-02-27T15:36:17.037034172Z [2024-02-27 15:36:17 +0000] [97] [INFO] Starting gunicorn 20.1.0
2024-02-27T15:36:17.039640612Z [2024-02-27 15:36:17 +0000] [97] [INFO] Listening at: unix:/tmp/gunicorn--dsmr_webinterface.socket (97)
2024-02-27T15:36:17.039917720Z [2024-02-27 15:36:17 +0000] [97] [INFO] Using worker: sync
2024-02-27T15:36:17.061597800Z [2024-02-27 15:36:17 +0000] [116] [INFO] Booting worker with pid: 116
2024-02-27T15:36:20.030261684Z Current logging level set to "ERROR". More information can be found here: https://dsmr-reader.readthedocs.io/en/latest/how-to/troubleshooting/enabling-debug-logging.html
2024-02-27T15:36:20.237959986Z Current logging level set to "ERROR". More information can be found here: https://dsmr-reader.readthedocs.io/en/latest/how-to/troubleshooting/enabling-debug-logging.html

After the last line no entries are added, no idea if this is expected behavior? I would expect to see more data :)