Bee-Mar / mmpm

MagicMirror Package Manager
MIT License
198 stars 30 forks source link

BUG: `mmpm db -r` is broken, docker build fails #141

Closed khassel closed 10 months ago

khassel commented 1 year ago

see job log https://gitlab.com/khassel/mmpm/-/jobs/5169922809

+ Initializing MagicMirror 3rd party packages database Traceback (most recent call last):
  File "/root/.local/bin/mmpm", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/root/.local/lib/python3.11/site-packages/mmpm/entrypoint.py", line 12, in main
    _main_(args)
  File "/root/.local/lib/python3.11/site-packages/mmpm/mmpm.py", line 51, in main
    packages: Dict[str, List[MagicMirrorPackage]] = mmpm.core.load_packages(force_refresh=should_refresh)
                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/root/.local/lib/python3.11/site-packages/mmpm/core.py", line 1063, in load_packages
    json.dump(packages, db, default=lambda pkg: pkg.serialize())
  File "/usr/local/lib/python3.11/json/__init__.py", line 179, in dump
    for chunk in iterable:
  File "/usr/local/lib/python3.11/json/encoder.py", line 432, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/local/lib/python3.11/json/encoder.py", line 377, in _iterencode_dict
    raise TypeError(f'keys must be str, int, float, bool or None, '
TypeError: keys must be str, int, float, bool or None, not Tag

Because I did'nt change anything in the build process this is probably caused by python dependencies.

Bee-Mar commented 1 year ago

The 3rd party modules page has been updated and is causing issues due to the layout. I have a rework of the whole codebase functioning, but am working on patching the current release

Bee-Mar commented 1 year ago

just pushed a fix directly to develop and will release a new version

Bee-Mar commented 1 year ago

@khassel the new version is available and should solve the issue

khassel commented 1 year ago

I always build the whole stuff which means

I cannot say if the issue is solved because the gui build is broken, the logs are full of deprecations and the used node v16 has reached end of live, you can take a closer look here but I think you will have the same problem running a local gui build ...

Bee-Mar commented 11 months ago

@khassel I've been working on a version 4.0.0, which is a complete rewrite of the CLI and UI, with substantially better construction, and unit tests this time lol. I haven't gone through the process of actually working through the official installation, but if you want to take a look through things and give it a shot, it's the code-cleanup branch. The UI is almost complete as of last night, with the only feature missing is the ability to hide/show modules, which will be done tonight.

Bee-Mar commented 10 months ago

@khassel I'm working on the pipeline build for it right now. The setup is much easier, and doesn't require NGINX anymore. Installing/starting the UI is done through PM2. I'm also going to be rebasing the develop branch in a few minutes. It might be a good idea to test out your build of the docker image soon.

khassel commented 10 months ago

can you document what has changed? Sounds there are breaking changes and I have not enough time to go through all the code again.

As already mentioned above I'm doing 3 steps

I also need the info how to start the app (without pm2).

So if there are changes in the build steps or start command it would be helpful to get these infos here, thanks.

Bee-Mar commented 10 months ago

@khassel 4.0.0 has been released. This is a complete rework of the application with improvements and stability all-around. Please see How to Migrate to 4.x.x as well the rest of the pages in the Wiki