DarkflameUniverse / NexusDashboard

Dashboard for Complete Management of a DLU game server
GNU Affero General Public License v3.0
47 stars 7 forks source link

Can't use the send mail function #100

Closed MustacheMan2 closed 4 months ago

MustacheMan2 commented 4 months ago

Always an internal error. Running Windows, but also have had the same issue on Linux for months.

--- Logging error ---
Traceback (most recent call last):
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 1455, in wsgi_app
    response = self.full_dispatch_request()
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 869, in full_dispatch_request
    rv = self.handle_user_exception(e)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 867, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 852, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask_user\decorators.py", line 58, in decorator
    return view_function(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gamer\Desktop\NexusDashboard\app\__init__.py", line 359, in wrapper
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Gamer\Desktop\NexusDashboard\app\mail.py", line 71, in send
    items = query_cdclient(
            ^^^^^^^^^^^^^^^
  File "C:\Users\Gamer\Desktop\NexusDashboard\app\luclient.py", line 222, in query_cdclient
    rv = cur.fetchall()
         ^^^^^^^^^^^^^^
sqlite3.OperationalError: Could not decode to UTF-8 column 'name' with text 'Test UGC Model - Caf� Corner'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\logging\__init__.py", line 1163, in emit
    stream.write(msg + self.terminator)
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode character '\ufffd' in position 1759: character maps to <undefined>
Call stack:
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1030, in _bootstrap
    self._bootstrap_inner()
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
    self.run()
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\socketserver.py", line 692, in process_request_thread
    self.finish_request(request, client_address)
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\socketserver.py", line 362, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\socketserver.py", line 761, in __init__
    self.handle()
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\serving.py", line 390, in handle
    super().handle()
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\http\server.py", line 436, in handle
    self.handle_one_request()
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\http\server.py", line 424, in handle_one_request
    method()
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\serving.py", line 362, in run_wsgi
    execute(self.server.app)
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\werkzeug\serving.py", line 323, in execute
    application_iter = app(environ, start_response)
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 1478, in __call__
    return self.wsgi_app(environ, start_response)
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 1458, in wsgi_app
    response = self.handle_exception(e)
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 804, in handle_exception
    self.log_exception(exc_info)
  File "C:\Users\Gamer\AppData\Local\Programs\Python\Python312\Lib\site-packages\flask\app.py", line 825, in log_exception
    self.logger.error(
Message: 'Exception on /mail/send [GET]'
Arguments: ()
127.0.0.1 - - [30/Jul/2024 09:55:39] "GET /mail/send HTTP/1.1" 500 -
aronwk-aaron commented 4 months ago

re-covert cdclient outside of DLU. This has to do with an encoding issue that happens wit one item that DLU's convertor does not account for and thus causes issues with reading the bad encoding.