DarkflameUniverse / NexusDashboard

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

get_cdclient() #99

Open DannehSC opened 2 months ago

DannehSC commented 2 months ago

Hello, I am attempting to get my dashboard setup, but it cannot display any actual images/models/etc and I keep receiving this error.

The webpages will load data from the database, including my account.

It is running via docker. /app/luclient is a copy of the client on my server.

2024-07-05T22:31:52.665524951Z  INFO  [alembic.runtime.migration] Context impl MySQLImpl.
2024-07-05T22:31:52.665560266Z  INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
2024-07-05T22:31:52.877833241Z  [2024-07-05 22:31:52 +0000] [35] [INFO] Starting gunicorn 21.2.0
2024-07-05T22:31:52.877967098Z  [2024-07-05 22:31:52 +0000] [35] [INFO] Listening at: http://0.0.0.0:8000 (35)
2024-07-05T22:31:52.877978112Z  [2024-07-05 22:31:52 +0000] [35] [INFO] Using worker: sync
2024-07-05T22:31:52.879613884Z  [2024-07-05 22:31:52 +0000] [36] [INFO] Booting worker with pid: 36
2024-07-05T22:31:52.931300533Z  [2024-07-05 22:31:52 +0000] [37] [INFO] Booting worker with pid: 37
2024-07-05T22:31:52.997952380Z  [2024-07-05 22:31:52 +0000] [38] [INFO] Booting worker with pid: 38
2024-07-05T22:31:53.007742636Z  [2024-07-05 22:31:53 +0000] [39] [INFO] Booting worker with pid: 39
2024-07-05T22:32:08.444059240Z  [2024-07-05 22:32:08 +0000] [37] [ERROR] Exception on /characters/inventory/2/0 [GET]
2024-07-05T22:32:08.444095046Z  Traceback (most recent call last):
2024-07-05T22:32:08.444105732Z    File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 1455, in wsgi_app
2024-07-05T22:32:08.444112764Z      response = self.full_dispatch_request()
2024-07-05T22:32:08.444118988Z                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444125124Z    File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 869, in full_dispatch_request
2024-07-05T22:32:08.444131384Z      rv = self.handle_user_exception(e)
2024-07-05T22:32:08.444137359Z           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444143298Z    File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 867, in full_dispatch_request
2024-07-05T22:32:08.444149459Z      rv = self.dispatch_request()
2024-07-05T22:32:08.444155520Z           ^^^^^^^^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444161481Z    File "/usr/local/lib/python3.11/site-packages/flask/app.py", line 852, in dispatch_request
2024-07-05T22:32:08.444167500Z      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
2024-07-05T22:32:08.444173514Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444179728Z    File "/usr/local/lib/python3.11/site-packages/flask_user/decorators.py", line 58, in decorator
2024-07-05T22:32:08.444185790Z      return view_function(*args, **kwargs)
2024-07-05T22:32:08.444191666Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444197551Z    File "/app/characters.py", line 180, in inventory
2024-07-05T22:32:08.444203529Z      return render_template(
2024-07-05T22:32:08.444209388Z             ^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444215190Z    File "/usr/local/lib/python3.11/site-packages/flask/templating.py", line 152, in render_template
2024-07-05T22:32:08.444221191Z      return _render(app, template, context)
2024-07-05T22:32:08.444241491Z             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444248587Z    File "/usr/local/lib/python3.11/site-packages/flask/templating.py", line 133, in _render
2024-07-05T22:32:08.444254215Z      rv = template.render(context)
2024-07-05T22:32:08.444259147Z           ^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444264191Z    File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 1304, in render
2024-07-05T22:32:08.444269229Z      self.environment.handle_exception()
2024-07-05T22:32:08.444274105Z    File "/usr/local/lib/python3.11/site-packages/jinja2/environment.py", line 939, in handle_exception
2024-07-05T22:32:08.444278992Z      raise rewrite_traceback_stack(source=source)
2024-07-05T22:32:08.444283838Z    File "/app/templates/partials/charxml/_inventory.html.j2", line 3, in top-level template code
2024-07-05T22:32:08.444288849Z      {% include 'partials/charxml/_inv_grid.html.j2' %}
2024-07-05T22:32:08.444293658Z      ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444300078Z    File "/app/templates/partials/charxml/_inv_grid.html.j2", line 14, in top-level template code
2024-07-05T22:32:08.444305807Z      title="{% include 'partials/charxml/_item_tooltip.html.j2' %}"
2024-07-05T22:32:08.444310942Z      ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444315795Z    File "/app/templates/partials/charxml/_item_tooltip.html.j2", line 1, in top-level template code
2024-07-05T22:32:08.444320704Z      {% set base_stat = inv_item.attr_l|get_lot_stats %}
2024-07-05T22:32:08.444325440Z      ^^^^^^^^^^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444330212Z    File "/app/luclient.py", line 379, in get_lot_stats
2024-07-05T22:32:08.444335063Z      stats = query_cdclient(
2024-07-05T22:32:08.444339787Z              ^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444344489Z    File "/app/luclient.py", line 221, in query_cdclient
2024-07-05T22:32:08.444349289Z      cur = get_cdclient().execute(query, args)
2024-07-05T22:32:08.444355324Z            ^^^^^^^^^^^^^^^^^^^^^^
2024-07-05T22:32:08.444360385Z  AttributeError: 'NoneType' object has no attribute 'execute'
aronwk-aaron commented 2 months ago

Do you have the CD_SQLITE_LOCATION setting set properly?

DannehSC commented 2 months ago

I meant to update this a little bit ago today. lol I got the CDServer.sqlite in the folder now, but now I cannot see any assets, and it keeps trying to load /luclient/unknown but it's saying too many redirects

Side note: It's actually hammering itself. 3000 requests in just less than a minute.