Skip to content

MySQL Problem mit Zeichensatz/Umlauten in message #522

@IT-Fuzzi

Description

@IT-Fuzzi
  • BOSWatch Version + Branch
    BOSWatch 2.5.2 - Master

  • genutzte Plugins
    MySQL
    Telegram

  • Fehlerbeschreibung
    Wenn die msg Umlaute enhält bricht bei mir die MySQL Verbindung mit der unten angegebenen Fehlermeldung ab. Irgendwie scheint wohl der Zeichensatz nicht ganz zu stimmen, aber ich komme einfach nicht auf den Fehler.
    Python 2.7.13
    DB boswatch: utf8mb4_unicode_ci
    DB table: bos_pocag - Field msg Kollation -> utf8mb4_unicode_ci
    Server-Version: 10.1.48-MariaDB-0+deb9u1 - Raspbian 9.11
    mysql-connector-python 8.0.26
    Kollation der MySQL-Verbindung: utf8mb4_unicode_ci
    MySQL.py beim Aufbau der Verbindung hat bereits: charset = 'utf8mb4', collation = 'utf8mb4_general_ci' gesetzt.

  • Logfile (Auszug)

MySQL           [DEBUG   ] cannot Insert POC
Traceback (most recent call last):
  File "/opt/boswatch/plugins/MySQL/MySQL.py", line 127, in run
    cursor.execute("INSERT INTO "+globalVars.config.get("MySQL","tablePOC")+" (`time`, `ric`, `function`, `functionChar`, `msg`, `bitrate`, `description`) VALUES (FROM_UNIXTIME(%s),%s,%s,%s,%s,%s,%s)", (data["timestamp"], data["ric"], data["function"],$
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/cursor.py", line 556, in execute
    psub = _ParamSubstitutor(self._process_params(params))
  File "/usr/local/lib/python2.7/dist-packages/mysql/connector/cursor.py", line 436, in _process_params
    "Failed processing format-parameters; %s" % err)
ProgrammingError: Failed processing format-parameters; '**ascii**' codec can't decode byte 0xc3 in position 23: ordinal not in range(128)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions