Skip to content

Hanazeder_server v1.1.1 does not start with werkzeug>3.x #6

@da-bernie

Description

@da-bernie

I updated my Docker images and came across the problem.
The server no longer starts with version 3.x of the werkzeug library.

Traceback (most recent call last): File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/usr/local/lib/python3.10/site-packages/hanazeder_server/mqtt.py", line 6, in <module> from quart import Quart File "/usr/local/lib/python3.10/site-packages/quart/__init__.py", line 5, in <module> from .app import Quart as Quart File "/usr/local/lib/python3.10/site-packages/quart/app.py", line 46, in <module> from werkzeug.urls import url_quote ImportError: cannot import name 'url_quote' from 'werkzeug.urls' (/usr/local/lib/python3.10/site-packages/werkzeug/urls.py)

If I go to version 2.2.2 of Werkzeug, I get the following error message.
hanazeder | Traceback (most recent call last): hanazeder | File "/usr/local/lib/python3.10/runpy.py", line 196, in _run_module_as_main hanazeder | return _run_code(code, main_globals, None, hanazeder | File "/usr/local/lib/python3.10/runpy.py", line 86, in _run_code hanazeder | exec(code, run_globals) hanazeder | File "/usr/local/lib/python3.10/site-packages/hanazeder_server/mqtt.py", line 9, in <module> hanazeder | from hanazeder_server.MqttClient import MqttClient hanazeder | File "/usr/local/lib/python3.10/site-packages/hanazeder_server/MqttClient.py", line 1, in <module> hanazeder | from asyncio_mqtt import Client, ProtocolVersion, Will hanazeder | File "/usr/local/lib/python3.10/site-packages/asyncio_mqtt/__init__.py", line 3, in <module> hanazeder | from .client import Client, Will, ProtocolVersion hanazeder | File "/usr/local/lib/python3.10/site-packages/asyncio_mqtt/client.py", line 591, in <module> hanazeder | _PahoSocket = Union[socket.socket, mqtt.WebsocketWrapper] hanazeder | AttributeError: module 'paho.mqtt.client' has no attribute 'WebsocketWrapper'. Did you mean: '_WebsocketWrapper'?

Dockerfile
`FROM python:3.10-alpine3.16

RUN apk update &&
apk add usbutils bash wget

RUN pip3 install --no-cache-dir --upgrade pip &&
pip3 install --no-cache-dir hanazeder_server

COPY entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]`

entrypoint.sh
`#!/bin/sh

python -m hanazeder_server.mqtt --serial-port /dev/..... --mqtt-server 192.168.x.x`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions