Closed rhildred closed 1 month ago
Describe the bug Requirements.txt step works, python setup.py as well but fails on python main.py. Missing requirements:
python setup.py
python main.py
flask_cors flask_restful
When the requirements are added, I get this error:
python3 main.py ╭──────────────────────────────────────────────────────────────────── Web CMS ────────────────────────────────────────────────────────────────────╮ │ Web CMS Launching system... │ │ ____ ____ ____ │ │ | | / / __/ ) / __/ |/ / / │ │ | | /| / / / / | / / / /|/ /_ \ │ │ | |/ |/ / // // / / /__/ / / // / │ │ |/|/// _// /_//__/ │ │ │ ╰──────────────────────────────────────────────────────────────────── V 1.0.0 ────────────────────────────────────────────────────────────────────╯ [info 2024-05-25 12:36:05.376019] Initializing routers... ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /Users/rhildred/Downloads/web-cms-project-main/main.py:11 in │ │ │ │ 8 │ │ 9 # │ │ 10 if name == "main__": │ │ ❱ 11 │ boot_up() │ │ 12 │ │ │ 13 │ # App launch │ │ 14 │ app.run(debug=config.getboolean("DEVELOPMENT", "Debug"), host=config.get( │ │ │ │ ╭─────────────────────────────────────── locals ────────────────────────────────────────╮ │ │ │ annotations = {} │ │ │ │ builtins = <module 'builtins' (built-in)> │ │ │ │ cached = None │ │ │ │ doc = None │ │ │ │ file = '/Users/rhildred/Downloads/web-cms-project-main/main.py' │ │ │ │ loader = <_frozen_importlib_external.SourceFileLoader object at 0x10f1b0d90> │ │ │ │ name = 'main' │ │ │ │ package = None │ │ │ │ spec = None │ │ │ │ app = <Flask 'core.application'> │ │ │ │ boot_up = <function boot_up at 0x1116735b0> │ │ │ │ config = <configparser.ConfigParser object at 0x110955c30> │ │ │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/rhildred/Downloads/web-cms-project-main/core/bootup.py:97 in boot_up │ │ │ │ 94 │ │ │ 95 │ # Initialize │ │ 96 │ permissions = PermissionsLoader() │ │ ❱ 97 │ permissions.load_permissions() │ │ 98 │ │ │ 99 │ plugins = PluginLoader() │ │ 100 │ │ │ │ ╭───────────────────────────────────── locals ─────────────────────────────────────╮ │ │ │ cli_text = <extentions.cli.responses.CLIResponses object at 0x10f093c10> │ │ │ │ permissions = <core.loaders.permissions.PermissionsLoader object at 0x11169f820> │ │ │ ╰──────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/rhildred/Downloads/web-cms-project-main/core/loaders/permissions.py:31 in │ │ load_permissions │ │ │ │ 28 │ │ │ │ 29 │ │ # Plugin reader │ │ 30 │ │ │ │ ❱ 31 │ │ active_plugins = self.plugin_laoder.get_active_plugins() │ │ 32 │ │ │ │ 33 │ │ for aplugins in active_plugins: │ │ 34 │ │ │ get_perms = self.plugin_reader.read_permissions(aplugins) │ │ │ │ ╭─────────────────────────────────────── locals ────────────────────────────────────────╮ │ │ │ permissions = [{'identy': 'webcms.panel', 'description': 'Allows to login to panel'}] │ │ │ │ perms = {'identy': 'webcms.panel', 'description': 'Allows to login to panel'} │ │ │ │ self = <core.loaders.permissions.PermissionsLoader object at 0x11169f820> │ │ │ ╰───────────────────────────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/rhildred/Downloads/web-cms-project-main/core/loaders/plugins.py:141 in get_active_plugins │ │ │ │ 138 │ │ │ 139 │ def get_active_plugins(self): │ │ 140 │ │ # Read all active plugins │ │ ❱ 141 │ │ database_active_plugins = self.db.get_parsed_config("active_plugins") │ │ 142 │ │ active_plugins = [] │ │ 143 │ │ │ │ 144 │ │ # Check loop │ │ │ │ ╭───────────────────────────── locals ─────────────────────────────╮ │ │ │ self = <core.loaders.plugins.PluginLoader object at 0x11169f6a0> │ │ │ ╰──────────────────────────────────────────────────────────────────╯ │ │ │ │ /Users/rhildred/Downloads/web-cms-project-main/core/configreader.py:93 in get_parsed_config │ │ │ │ 90 │ │ │ db.Configuration.name == config_name) │ │ 91 │ │ │ │ 92 │ │ if query is None: │ │ ❱ 93 │ │ │ raise ConfigurationNotExistsError(config_name) │ │ 94 │ │ │ │ 95 │ │ parse = json.loads(query.value) │ │ 96 │ │ │ │ ╭──────────────────────────────── locals ────────────────────────────────╮ │ │ │ config_name = 'active_plugins' │ │ │ │ query = None │ │ │ │ self = <core.configreader.DataBaseConfig object at 0x1115ea1d0> │ │ │ ╰────────────────────────────────────────────────────────────────────────╯ │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ConfigurationNotExistsError: active_plugins
To Reproduce Steps to reproduce the behavior: (config.ini)
[DATABASE] Driver = Sqlite Path = subconf.sqlite3 [DEVELOPMENT] Debug = off HashTime = 12 Host = 127.0.0.1 Port = 5000
Expected behavior Expect to see the flask server running.
Desktop (please complete the following information):
CMS Version
Additional context There seems to be data in the database:
I can send the database if it helps. It wouldn't let me attach it. Hoping to use this in September for a low code web course.
Stale issue message
Describe the bug Requirements.txt step works,
python setup.py
as well but fails onpython main.py
. Missing requirements:When the requirements are added, I get this error:
python3 main.py │
│ │
│ 8 │
│ 9 # │
│ 10 if name == "main__": │
│ ❱ 11 │ boot_up() │
│ 12 │ │
│ 13 │ # App launch │
│ 14 │ app.run(debug=config.getboolean("DEVELOPMENT", "Debug"), host=config.get( │
│ │
│ ╭─────────────────────────────────────── locals ────────────────────────────────────────╮ │
│ │ annotations = {} │ │
│ │ builtins = <module 'builtins' (built-in)> │ │
│ │ cached = None │ │
│ │ doc = None │ │
│ │ file = '/Users/rhildred/Downloads/web-cms-project-main/main.py' │ │
│ │ loader = <_frozen_importlib_external.SourceFileLoader object at 0x10f1b0d90> │ │
│ │ name = 'main' │ │
│ │ package = None │ │
│ │ spec = None │ │
│ │ app = <Flask 'core.application'> │ │
│ │ boot_up = <function boot_up at 0x1116735b0> │ │
│ │ config = <configparser.ConfigParser object at 0x110955c30> │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/rhildred/Downloads/web-cms-project-main/core/bootup.py:97 in boot_up │
│ │
│ 94 │ │
│ 95 │ # Initialize │
│ 96 │ permissions = PermissionsLoader() │
│ ❱ 97 │ permissions.load_permissions() │
│ 98 │ │
│ 99 │ plugins = PluginLoader() │
│ 100 │
│ │
│ ╭───────────────────────────────────── locals ─────────────────────────────────────╮ │
│ │ cli_text = <extentions.cli.responses.CLIResponses object at 0x10f093c10> │ │
│ │ permissions = <core.loaders.permissions.PermissionsLoader object at 0x11169f820> │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/rhildred/Downloads/web-cms-project-main/core/loaders/permissions.py:31 in │
│ load_permissions │
│ │
│ 28 │ │ │
│ 29 │ │ # Plugin reader │
│ 30 │ │ │
│ ❱ 31 │ │ active_plugins = self.plugin_laoder.get_active_plugins() │
│ 32 │ │ │
│ 33 │ │ for aplugins in active_plugins: │
│ 34 │ │ │ get_perms = self.plugin_reader.read_permissions(aplugins) │
│ │
│ ╭─────────────────────────────────────── locals ────────────────────────────────────────╮ │
│ │ permissions = [{'identy': 'webcms.panel', 'description': 'Allows to login to panel'}] │ │
│ │ perms = {'identy': 'webcms.panel', 'description': 'Allows to login to panel'} │ │
│ │ self = <core.loaders.permissions.PermissionsLoader object at 0x11169f820> │ │
│ ╰───────────────────────────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/rhildred/Downloads/web-cms-project-main/core/loaders/plugins.py:141 in get_active_plugins │
│ │
│ 138 │ │
│ 139 │ def get_active_plugins(self): │
│ 140 │ │ # Read all active plugins │
│ ❱ 141 │ │ database_active_plugins = self.db.get_parsed_config("active_plugins") │
│ 142 │ │ active_plugins = [] │
│ 143 │ │ │
│ 144 │ │ # Check loop │
│ │
│ ╭───────────────────────────── locals ─────────────────────────────╮ │
│ │ self = <core.loaders.plugins.PluginLoader object at 0x11169f6a0> │ │
│ ╰──────────────────────────────────────────────────────────────────╯ │
│ │
│ /Users/rhildred/Downloads/web-cms-project-main/core/configreader.py:93 in get_parsed_config │
│ │
│ 90 │ │ │ db.Configuration.name == config_name) │
│ 91 │ │ │
│ 92 │ │ if query is None: │
│ ❱ 93 │ │ │ raise ConfigurationNotExistsError(config_name) │
│ 94 │ │ │
│ 95 │ │ parse = json.loads(query.value) │
│ 96 │
│ │
│ ╭──────────────────────────────── locals ────────────────────────────────╮ │
│ │ config_name = 'active_plugins' │ │
│ │ query = None │ │
│ │ self = <core.configreader.DataBaseConfig object at 0x1115ea1d0> │ │
│ ╰────────────────────────────────────────────────────────────────────────╯ │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
ConfigurationNotExistsError: active_plugins
╭──────────────────────────────────────────────────────────────────── Web CMS ────────────────────────────────────────────────────────────────────╮ │ Web CMS Launching system... │ │ ____ ____ ____ │ │ | | / / __/ ) / __/ |/ / / │ │ | | /| / / / / | / / / /|/ /_ \ │ │ | |/ |/ / // // / / /__/ / / // / │ │ |/|/// _// /_//__/ │ │ │ ╰──────────────────────────────────────────────────────────────────── V 1.0.0 ────────────────────────────────────────────────────────────────────╯ [info 2024-05-25 12:36:05.376019] Initializing routers... ╭─────────────────────────────── Traceback (most recent call last) ────────────────────────────────╮ │ /Users/rhildred/Downloads/web-cms-project-main/main.py:11 in
To Reproduce Steps to reproduce the behavior: (config.ini)
Expected behavior Expect to see the flask server running.
Desktop (please complete the following information):
CMS Version
Additional context There seems to be data in the database:
I can send the database if it helps. It wouldn't let me attach it. Hoping to use this in September for a low code web course.