Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL Problem mit Zeichensatz/Umlauten in message #522

Open
IT-Fuzzi opened this issue Sep 6, 2021 · 0 comments
Open

MySQL Problem mit Zeichensatz/Umlauten in message #522

IT-Fuzzi opened this issue Sep 6, 2021 · 0 comments

Comments

@IT-Fuzzi
Copy link

IT-Fuzzi commented Sep 6, 2021

  • 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants