Giter Club home page Giter Club logo

nexusdashboard's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nexusdashboard's Issues

game broke

Hi,

Username - AlexPep

I am having an issue within the server where I am being told I'm smashed after going through one of the earth transporters in Ninjago and the game is freezing me and not respawning. What can I do without creating a new character?

Thanks

ENH: Serve brickdb from app

Currently UGC model viewing relies upon on an public endpoint on my server, instead we should rely upon the brick db in LU that pre-built model viewing uses

BUG: Fresh Char can't be procesed

this xml from a fresh char breaks stuff

<obj v="1">
<mf hc="96" hs="6" hd="0" t="142" l="12" hdc="0" cd="24" lh="22785040" rh="22337732" es="4" ess="118" ms="23"/>
<char acct="5" cc="0" gm="0" ft="0" llog="1648679357" ls="0" lzx="-626.5847" lzy="613.3515" lzz="-28.6374" lzrx="0.0" lzry="0.7015" lzrz="0.0" lzrw="0.7126" stt="0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;"/>
<dest hm="4" hc="4" im="0" ic="0" am="0" ac="0" d="0"/>
<inv>
<bag>
<b t="0" m="20"/>
<b t="1" m="240"/>
<b t="2" m="240"/>
<b t="3" m="240"/>
</bag>
<items>
<in t="0">
<i l="24263" id="1152921508901814439" s="0" c="1" eq="1" b="1"/>
<i l="23902" id="1152921508901814440" s="1" c="1" eq="1" b="1"/>
</in>
</items>
</inv>
<lvl l="1" cv="1" sb="500"/>
<flag/>
</obj>

Errors while trying to start.

Hey, I just got to the very end of this manual for setting this dashboard up, and I was going through a trial and error of trying to start than installing packages via pip that weren't installed, and I came across this error when trying to upgrade the db:

Error: While importing 'wsgi', an ImportError was raised:

Traceback (most recent call last):
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python311\Lib\site-packages\flask\cli.py", line 214, in locate_app
    __import__(module_name)
  File "C:\DU\NexusDashboard-main\wsgi.py", line 2, in <module>
    from app import create_app
  File "C:\DU\NexusDashboard-main\app\__init__.py", line 7, in <module>
    from app.models import db, migrate, PlayKey
  File "C:\DU\NexusDashboard-main\app\models.py", line 3, in <module>
    from flask_user import UserMixin
ModuleNotFoundError: No module named 'flask_user'


Usage: flask [OPTIONS] COMMAND [ARGS]...
Try 'flask --help' for help.

Error: No such command 'db'.

And it seems from posts online that flask_user is out of date or something, and when I try to install it, it can't install it. Also I did install flask_migrate so idk why the db command isn't working. I already have the server working, I can play on the server, and I even have the account manager working. And if I try to run this: gunicorn -b :8000 -w 4 wsgi:app, I get this:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python311\Scripts\gunicorn.exe\__main__.py", line 4, in <module>
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python311\Lib\site-packages\gunicorn\app\wsgiapp.py", line 9, in <module>
    from gunicorn.app.base import Application
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python311\Lib\site-packages\gunicorn\app\base.py", line 11, in <module>
    from gunicorn import util
  File "C:\Users\<user>\AppData\Local\Programs\Python\Python311\Lib\site-packages\gunicorn\util.py", line 8, in <module>
    import fcntl
ModuleNotFoundError: No module named 'fcntl'

And it seems fcntl isn't installable either. And of course trying to just do flask run results in in the error with flask_user not being installed.

Edit*: On top of this, when I try to do pip install -r requirements.txt, I get a ton of errors relating to greenlet.

ENH: Eco Graphs

Right now, they suck

Make a week by week view where you can page through weeks
and make a date range picker so people can crash their browsers if the so choose

ENH: Add an option to remove models from properties

When cop fails to process brick models, they can build up in the files without the user knowing, and can cause the property to be unloadable. There should be an option to remove the models individually as well as all models to clean up broken properties and make them usable again.

Error when disabling play keys

When disabling requiring play keys in settings.py, running the dashboard with gunicorn and creating an account as you normally would, a big error comes up, here it is:

File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 808, in _prepare_impl self.session.flush() File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 3298, in flush self._flush(objects) File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 3437, in _flush with util.safe_reraise(): File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/util/langhelpers.py", line 70, in __exit__ compat.raise_( File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 207, in raise_ raise exception File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/orm/session.py", line 3398, in _flush flush_context.execute() File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/orm/unitofwork.py", line 456, in execute rec.execute(self) File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/orm/unitofwork.py", line 630, in execute util.preloaded.orm_persistence.save_obj( File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/orm/persistence.py", line 242, in save_obj _emit_insert_statements( File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/orm/persistence.py", line 1219, in _emit_insert_statements result = connection._execute_20( File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1583, in _execute_20 return meth(self, args_10style, kwargs_10style, execution_options) File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/sql/elements.py", line 323, in _execute_on_connection return connection._execute_clauseelement( File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1452, in _execute_clauseelement ret = self._execute_context( File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1814, in _execute_context self._handle_dbapi_exception( File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1995, in _handle_dbapi_exception util.raise_( File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/util/compat.py", line 207, in raise_ raise exception File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/engine/base.py", line 1771, in _execute_context self.dialect.do_execute( File "/home/ubuntu/.local/lib/python3.10/site-packages/sqlalchemy/engine/default.py", line 717, in do_execute cursor.execute(statement, parameters) File "/home/ubuntu/.local/lib/python3.10/site-packages/pymysql/cursors.py", line 148, in execute result = self._query(query) File "/home/ubuntu/.local/lib/python3.10/site-packages/pymysql/cursors.py", line 310, in _query conn.query(q) File "/home/ubuntu/.local/lib/python3.10/site-packages/pymysql/connections.py", line 548, in query self._affected_rows = self._read_query_result(unbuffered=unbuffered) File "/home/ubuntu/.local/lib/python3.10/site-packages/pymysql/connections.py", line 775, in _read_query_result result.read() File "/home/ubuntu/.local/lib/python3.10/site-packages/pymysql/connections.py", line 1156, in read first_packet = self.connection._read_packet() File "/home/ubuntu/.local/lib/python3.10/site-packages/pymysql/connections.py", line 725, in _read_packet packet.raise_for_error() File "/home/ubuntu/.local/lib/python3.10/site-packages/pymysql/protocol.py", line 221, in raise_for_error err.raise_mysql_exception(self._data) File "/home/ubuntu/.local/lib/python3.10/site-packages/pymysql/err.py", line 143, in raise_mysql_exception raise errorclass(errno, errval) sqlalchemy.exc.IntegrityError: (pymysql.err.IntegrityError) (1048, "Column 'play_key_id' cannot be null") [SQL: INSERT INTO accounts (name, email_confirmed_at, password, active, play_key_id) VALUES (%(name)s, %(email_confirmed_at)s, %(password)s, %(active)s, %(play_key_id)s)] [parameters: {'name': 'test', 'email_confirmed_at': None, 'password': '$2b$12$ZRhSsSbMkvNsqS7RYb/3heubZn.edLFY1FmP6izrxDY0qzNVNWYv.', 'active': 1, 'play_key_id': None}] (Background on this error at: https://sqlalche.me/e/14/gkpj)

The most important part is that, sqlalchemy does not like setting the play_key_id column to None. When enabling play keys, the registration process works flawlessly otherwise. Some other notes:

  • The dashboard is being run on port 5000 instead of port 8000 (AccountManager's default, since I'm lazy to enable the port)
  • I didn't extract the brick models and stuff because I don't care about those features, but I did copy the locale and cdclient.

mesh subdir of BrickModels does not exist in unpacked client

properties.py looks for models in the mesh subdir of BrickModels. However the BrickModels dir from the unpacked client does not contain these sub directories.

[2022-03-31 04:32:11 +0000] [11009] [ERROR] ERROR on app/cache/BrickModels/mesh/reward/rew_ninjagomonastery_screen.lod1.mtl:
 [Errno 2] No such file or directory: 'app/luclient/res/BrickModels/mesh/reward/rew_ninjagomonastery_screen.lxfml'
[2022-03-31 04:32:11 +0000] [11011] [ERROR] ERROR on app/cache/BrickModels/mesh/reward/rew_ninjagomonastery_walloutsidecorner1.lod1.mtl:
 [Errno 2] No such file or directory: 'app/luclient/res/BrickModels/mesh/reward/rew_ninjagomonastery_walloutsidecorner1.lxfml'
[2022-03-31 04:32:12 +0000] [11011] [ERROR] Exception on /properties/get_model/70368744182634/mtl/1 [GET]
Traceback (most recent call last):
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1499, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask_user/decorators.py", line 58, in decorator
    return view_function(*args, **kwargs)
  File "/home/[redacted]/NexusDashboard/app/properties.py", line 315, in get_model
    response = prebuilt(content, file_format, lod)[0]
  File "/home/[redacted]/NexusDashboard/app/properties.py", line 381, in prebuilt
    with open(str(cache.as_posix()), 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'app/cache/BrickModels/mesh/reward/rew_ninjagomonastery_walloutsidecorner1.lod1.mtl'
[2022-03-31 04:32:12 +0000] [11009] [ERROR] Exception on /properties/get_model/70368744182661/mtl/1 [GET]
Traceback (most recent call last):
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1499, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask_user/decorators.py", line 58, in decorator
    return view_function(*args, **kwargs)
  File "/home/[redacted]/NexusDashboard/app/properties.py", line 315, in get_model
    response = prebuilt(content, file_format, lod)[0]
  File "/home/[redacted]/NexusDashboard/app/properties.py", line 381, in prebuilt
    with open(str(cache.as_posix()), 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'app/cache/BrickModels/mesh/reward/rew_ninjagomonastery_screen.lod1.mtl'
[2022-03-31 04:32:12 +0000] [11012] [ERROR] ERROR on app/cache/BrickModels/mesh/reward/rew_ninjagomonastery_wall4.lod1.mtl:
 [Errno 2] No such file or directory: 'app/luclient/res/BrickModels/mesh/reward/rew_ninjagomonastery_wall4.lxfml'
[2022-03-31 04:32:12 +0000] [11012] [ERROR] Exception on /properties/get_model/70368744182652/mtl/1 [GET]
Traceback (most recent call last):
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1499, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask_user/decorators.py", line 58, in decorator
    return view_function(*args, **kwargs)
  File "/home/[redacted]/NexusDashboard/app/properties.py", line 315, in get_model
    response = prebuilt(content, file_format, lod)[0]
  File "/home/[redacted]/NexusDashboard/app/properties.py", line 381, in prebuilt
    with open(str(cache.as_posix()), 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'app/cache/BrickModels/mesh/reward/rew_ninjagomonastery_wall4.lod1.mtl'
[2022-03-31 04:32:12 +0000] [11010] [ERROR] ERROR on app/cache/BrickModels/mesh/reward/rew_ninjagomonastery_wallinsidecorner1.lod1.mtl:
 [Errno 2] No such file or directory: 'app/luclient/res/BrickModels/mesh/reward/rew_ninjagomonastery_wallinsidecorner1.lxfml'
[2022-03-31 04:32:12 +0000] [11010] [ERROR] Exception on /properties/get_model/70368744182640/mtl/1 [GET]
Traceback (most recent call last):
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask/app.py", line 1499, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/home/[redacted]/.local/lib/python3.9/site-packages/flask_user/decorators.py", line 58, in decorator
    return view_function(*args, **kwargs)
  File "/home/[redacted]/NexusDashboard/app/properties.py", line 315, in get_model
    response = prebuilt(content, file_format, lod)[0]
  File "/home/[redacted]/NexusDashboard/app/properties.py", line 381, in prebuilt
    with open(str(cache.as_posix()), 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'app/cache/BrickModels/mesh/reward/rew_ninjagomonastery_wallinsidecorner1.lod1.mtl' 

image

Premission denied even when run as sudo

Trying to do the flask db update command to finish up the setup of the dashboard, but every time i try to run it, this pops up. I have followed every step exactly as specified, but for some reason it still always does this. Error thing down below
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1771, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/default.py", line 717, in do_execute
cursor.execute(statement, parameters)
File "/usr/local/lib/python3.10/dist-packages/pymysql/cursors.py", line 148, in execute
result = self._query(query)
File "/usr/local/lib/python3.10/dist-packages/pymysql/cursors.py", line 310, in _query
conn.query(q)
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 775, in _read_query_result
result.read()
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 1156, in read
first_packet = self.connection._read_packet()
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 725, in _read_packet
packet.raise_for_error()
File "/usr/local/lib/python3.10/dist-packages/pymysql/protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "/usr/local/lib/python3.10/dist-packages/pymysql/err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
pymysql.err.OperationalError: (1005, 'Can't create table darkflame.alembic_version (errno: 13 "Permission denied")')

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/bin/flask", line 8, in
sys.exit(main())
File "/usr/local/lib/python3.10/dist-packages/flask/cli.py", line 990, in main
cli.main(args=sys.argv[1:])
File "/usr/local/lib/python3.10/dist-packages/flask/cli.py", line 596, in main
return super().main(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1062, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1668, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/decorators.py", line 26, in new_func
return f(get_current_context(), *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/flask/cli.py", line 440, in decorator
return __ctx.invoke(f, *args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/click/core.py", line 763, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/flask_migrate/cli.py", line 149, in upgrade
_upgrade(directory, revision, sql, tag, x_arg)
File "/usr/local/lib/python3.10/dist-packages/flask_migrate/init.py", line 98, in wrapped
f(*args, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/flask_migrate/init.py", line 185, in upgrade
command.upgrade(config, revision, sql=sql, tag=tag)
File "/usr/local/lib/python3.10/dist-packages/alembic/command.py", line 320, in upgrade
script.run_env()
File "/usr/local/lib/python3.10/dist-packages/alembic/script/base.py", line 563, in run_env
util.load_python_file(self.dir, "env.py")
File "/usr/local/lib/python3.10/dist-packages/alembic/util/pyfiles.py", line 92, in load_python_file
module = load_module_py(module_id, path)
File "/usr/local/lib/python3.10/dist-packages/alembic/util/pyfiles.py", line 108, in load_module_py
spec.loader.exec_module(module) # type: ignore
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/home/brickmaster/NexusDashboard/migrations/env.py", line 91, in
run_migrations_online()
File "/home/brickmaster/NexusDashboard/migrations/env.py", line 85, in run_migrations_online
context.run_migrations()
File "", line 8, in run_migrations
File "/usr/local/lib/python3.10/dist-packages/alembic/runtime/environment.py", line 851, in run_migrations
self.get_context().run_migrations(**kw)
File "/usr/local/lib/python3.10/dist-packages/alembic/runtime/migration.py", line 603, in run_migrations
self._ensure_version_table()
File "/usr/local/lib/python3.10/dist-packages/alembic/runtime/migration.py", line 539, in _ensure_version_table
self._version.create(self.connection, checkfirst=True)
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/sql/schema.py", line 944, in create
bind._run_ddl_visitor(ddl.SchemaGenerator, self, checkfirst=checkfirst)
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 2082, in _run_ddl_visitor
visitorcallable(self.dialect, self, **kwargs).traverse_single(element)
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/sql/visitors.py", line 520, in traverse_single
return meth(obj, **kw)
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/sql/ddl.py", line 890, in visit_table
self.connection.execute(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1263, in execute
return meth(self, multiparams, params, _EMPTY_EXECUTION_OPTS)
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/sql/ddl.py", line 77, in _execute_on_connection
return connection._execute_ddl(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1353, in _execute_ddl
ret = self._execute_context(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1814, in _execute_context
self.handle_dbapi_exception(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1995, in handle_dbapi_exception
util.raise
(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/util/compat.py", line 207, in raise

raise exception
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/base.py", line 1771, in _execute_context
self.dialect.do_execute(
File "/usr/local/lib/python3.10/dist-packages/sqlalchemy/engine/default.py", line 717, in do_execute
cursor.execute(statement, parameters)
File "/usr/local/lib/python3.10/dist-packages/pymysql/cursors.py", line 148, in execute
result = self._query(query)
File "/usr/local/lib/python3.10/dist-packages/pymysql/cursors.py", line 310, in _query
conn.query(q)
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 548, in query
self._affected_rows = self._read_query_result(unbuffered=unbuffered)
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 775, in _read_query_result
result.read()
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 1156, in read
first_packet = self.connection._read_packet()
File "/usr/local/lib/python3.10/dist-packages/pymysql/connections.py", line 725, in _read_packet
packet.raise_for_error()
File "/usr/local/lib/python3.10/dist-packages/pymysql/protocol.py", line 221, in raise_for_error
err.raise_mysql_exception(self._data)
File "/usr/local/lib/python3.10/dist-packages/pymysql/err.py", line 143, in raise_mysql_exception
raise errorclass(errno, errval)
sqlalchemy.exc.OperationalError: (pymysql.err.OperationalError) (1005, 'Can't create table darkflame.alembic_version (errno: 13 "Permission denied")')
[SQL:
CREATE TABLE alembic_version (
version_num VARCHAR(32) NOT NULL,
CONSTRAINT alembic_version_pkc PRIMARY KEY (version_num)
)

]
(Background on this error at: https://sqlalche.me/e/14/e3q8)

`get`call exception

I integrated the NexusDashboard into the docker-compose.yml from the DarkflameServer.
Because I didn't manage to make the composition work with a remote repository, I cloned this repo and built the docker image from the source with the docker composition.

I get no errors on startup and everything seems to be fine but when I try to access the web page, I get an internal server error and I get an error stack trace from a get request via flask.
I am not very experienced with python so any help that could cause this error would be appreciated.

docker-compose.yml
docker log

Trying to Login to Dashboard throws error "Unknown column 'accounts.email' in 'field list'"

Am I dumb? Did I miss a step somewhere?

I went through the whole install process via the "Windows Manual" steps, ran the page with "flask run", I've got it open in my browser. But I need to sign in with a username and password, and I never made one for Nexus. (And there's no register button anywhere, despite me thinking there should be one while looking at the files)

I filled out settings.py with the username/pass for the database, and I tried them on the login page, but it throws an error, simply saying
"Internal Server Error

The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."

Yet the server itself doesn't show an error in powershell.
The only error I wasn't able to fix was the command "flask db upgrade" not being able to find the brickprimatives folder in \res\ (Which it couldn't find because I couldn't find it to put it in there.)((I assume the same would happen with the models textures and ui folders, as I couldn't find those either.))

Windows 10
With Python 3.8.0, as specified in the setup
ImageMagick-7.1.1-Q16

ENH: Configurable Strike/Ban system

When moderation properties, pet names, and char names and resolving bug/abuse reports have the ability to put a strike on the offending account.
After a configurable amount of strikes, mute account, and after more, ban account.
(or have it not do anything)

And potentially a configurable strike roll-off, where strikes become "inactive" after an amount of time, but are still viewable for the account.

Error when opening properties tab

A popup appears whenever I open the properties tab or any page involving properties. A restart will return things to normal, but only temporarily as it just comes back up again not much later.

image

Moderation Approval Site "View" Button wont work and trow an Internal Server Error Page

I have the following Error:
NexusDahsboard | [2022-10-11 20:27:05 +0000] [41] [ERROR] Exception on /characters/view/2 [GET]
NexusDahsboard | Traceback (most recent call last):
NexusDahsboard | File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2070, in wsgi_app
NexusDahsboard | response = self.full_dispatch_request()
NexusDahsboard | File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1515, in full_dispatch_request
NexusDahsboard | rv = self.handle_user_exception(e)
NexusDahsboard | File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1513, in full_dispatch_request
NexusDahsboard | rv = self.dispatch_request()
NexusDahsboard | File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1499, in dispatch_request
NexusDahsboard | return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
NexusDahsboard | File "/usr/local/lib/python3.8/site-packages/flask_user/decorators.py", line 58, in decorator
NexusDahsboard | return view_function(*args, **kwargs)
NexusDahsboard | File "/app/characters.py", line 95, in view
NexusDahsboard | if "i" in inv.keys() and type(inv["i"]) == list:
NexusDahsboard | AttributeError: 'str' object has no attribute 'keys'

This happens when I want to press the "View" Button on the Moderation Approval site.
I get a Internal Server Error on the Webinterface at the same time.

Anyone know if this is a me problem right now or generaly a problem still?

ENH: Show pet owners

This will be a brute force with a cache way to do it.
basicallyadd a column to the pet_names db table and then when the page loads find the owner and save it so we don't have to look again

ENH: Logging

Look into adding logging to a file and to cli

BUG: Property rendering can't load the models

When I try to view a propertie over the NexusDashboard, it will show me the Content under: Property Content with the correct items.
As soon as I try to render a singe item or view the XML of the model I will get a 500 error from Nginx, and when I try to render the full propertie, I will just get the green sqare empty.

The Console of the Dashbaord throws this error: [ERROR] Exception on /properties/get_model/70368744177671/mtl/2 [GET] -> FileNotFoundError: [Errno 2] No such file or directory: 'app/cache/BrickModels/mesh\\ftcommunityitems\\rew_modularcastlealtcolor_gate.lod2.mtl'

When I check, all of the folders under app/cache do contain what they should, but the BrickModels folder is empty.

I do not know how to sole this unfortunately, and would appreciate every help.

ND looks for cdclient.sqlite when CDServer.sqlite is actually needed

If you provide it a cdclient instead of a CDServer, certain aspects of ND will not work (eg, the send mail page IIRC). ND should prefer opening CDServer.sqlite instead of cdclient.sqlite if present so that luclient can be symlinked to the same client dir as the DLU server

Problem showing inventory items

There is a problem displaying inventory items
LUServer-2022-06-21-22-46-16

As I can understand there is a problem converting dds files to png. All caches files (/app/cache) although that are named .png after viewing as hex the header is DDS.

I had no problem/error while installing imagemagic.

I use linux Mint on Windows VM.

ENH: async ucg model loading instead of sequential loading

Loading large properties has issues.
the first being if the property has many individual files, it takes awhile to load
The second being that the viewer becomes basically unusable, due to all the geometry.

Can't really do anything about the second right now, but the first can be solved by loading them async

Sending SMTP via Mail Relay fails

Hello,

I run NexusDashboard in a docker container.
I'm trying to get it to send SMTP on Port 25 to a MailEnable relay I have configured to accept unauthenticated SMTP from a list of IP addresses and send them Authenticated.

Please let me know if you need anything else, I've been scratching my head for a few days.

My research indicates that it's filtering the "mail port" as a string instead of an integer.
https://stackoverflow.com/questions/23079017/servname-not-supported-for-ai-socktype

My email-related enviroment variables are as follows:

  USER_ENABLE_CHANGE_PASSWORD: "True"  # Allow users to change their password
  USER_ENABLE_CHANGE_USERNAME: "False"  # Allow users to change their usernam
  USER_ENABLE_REGISTER: "True"  # Allow new users to register
  USER_ENABLE_EMAIL: "True"  # Register with Email WILL - DISABLE OTHER THINGS TOO
  USER_ENABLE_CONFIRM_EMAIL: "True"  # Force users to confirm their email
  USER_ENABLE_INVITE_USER: "True"  # Allow users to be invited
  USER_REQUIRE_INVITATION: "True"  # Only invited users may - WILL DISABLE REGISTRATION
  USER_ENABLE_FORGOT_PASSWORD: "True"   # Allow users to reset their password
  MAIL_SERVER: "10.1.1.2" - #IP address of mailEnable relay
  MAIL_PORT: 25
  MAIL_USE_SSL: "False"
  MAIL_USE_TLS: "False"
  MAIL_USERNAME: None
  MAIL_PASSWORD: None
  USER_EMAIL_SENDER_NAME: Lego Universe
  USER_EMAIL_SENDER_EMAIL: [email protected]

Here is the log output when trying to invite a user.

raise EmailError('SMTP Connection error: Check your MAIL_SERVER and MAIL_PORT settings.')
socket.gaierror: [Errno -8] Servname not supported for ai_socktype
During handling of the above exception, another exception occurred:
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 2070, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1515, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1513, in full_dispatch_request
    rv = self.dispatch_request()
    return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
  File "/usr/local/lib/python3.8/site-packages/flask_user/user_manager.py", line 413, in invite_user_stub
  File "/usr/local/lib/python3.8/site-packages/flask/app.py", line 1499, in dispatch_request
    return self.invite_user_view()
  File "/usr/local/lib/python3.8/site-packages/flask_user/decorators.py", line 58, in decorator
    return view_function(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/flask_user/user_manager__views.py", line 335, in invite_user_view
    self.email_manager.send_invite_user_email(current_user, user_invitation)
  File "/usr/local/lib/python3.8/site-packages/flask_user/email_manager.py", line 122, in send_invite_user_email
    self._render_and_send_email(
  File "/usr/local/lib/python3.8/site-packages/flask_user/email_manager.py", line 191, in _render_and_send_email
    self.user_manager.email_adapter.send_email_message(
  File "/usr/local/lib/python3.8/site-packages/flask_user/email_adapters/smtp_email_adapter.py", line 68, in send_email_message
Traceback (most recent call last):
flask_user.EmailError: SMTP Connection error: Check your MAIL_SERVER and MAIL_PORT settings.
    self.mail.send(message)
  File "/usr/local/lib/python3.8/site-packages/flask_user/email_adapters/smtp_email_adapter.py", line 64, in send_email_message
  File "/usr/local/lib/python3.8/site-packages/flask_mail.py", line 491, in send
    with self.connect() as connection:
    self.host = self.configure_host()
  File "/usr/local/lib/python3.8/site-packages/flask_mail.py", line 144, in __enter__
  File "/usr/local/lib/python3.8/site-packages/flask_mail.py", line 156, in configure_host
    host = smtplib.SMTP_SSL(self.mail.server, self.mail.port)
  File "/usr/local/lib/python3.8/smtplib.py", line 1048, in __init__
    SMTP.__init__(self, host, port, local_hostname, timeout,
  File "/usr/local/lib/python3.8/smtplib.py", line 255, in __init__
    (code, msg) = self.connect(host, port)
  File "/usr/local/lib/python3.8/smtplib.py", line 339, in connect
    self.sock = self._get_socket(host, port, self.timeout)
  File "/usr/local/lib/python3.8/smtplib.py", line 1054, in _get_socket
  File "/usr/local/lib/python3.8/socket.py", line 787, in create_connection
    new_socket = socket.create_connection((host, port), timeout,
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
  File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):

ENH: Audit Log

Implement an audit log for all things so there is a paper trail if someone changes someone from the site.

  • Changing GM level
  • Moderating
  • mod mail

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.