Flatpak-module local-build fails in toolboxes

I’ve been trying to build some of my packages as flatpaks but I am unable to get flatpak-module to cooperate in a toolbox. I posted my comment here: Issue #5: flatpak-module local-build doesn't ran in toolbox - flatpak-module-tools - Pagure.io

I keep getting this python error:

Traceback (most recent call last):
  File "/usr/bin/mbs-manager", line 33, in <module>
    sys.exit(load_entry_point('module-build-service==3.6.1', 'console_scripts', 'mbs-manager')())
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/flask/cli.py", line 596, in main
    return super().main(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/flask/cli.py", line 440, in decorator
    return __ctx.invoke(f, *args, **kwargs)
  File "/usr/lib/python3.10/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/usr/lib/python3.10/site-packages/module_build_service/manage.py", line 133, in build_module_locally
    db.create_all()
  File "/usr/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 1094, in create_all
    self._execute_for_all_tables(app, bind, 'create_all')
  File "/usr/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 1086, in _execute_for_all_tables
    op(bind=self.get_engine(app, bind), **extra)
  File "/usr/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 1017, in get_engine
    return connector.get_engine()
  File "/usr/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 593, in get_engine
    sa_url, options = self.get_options(sa_url, echo)
  File "/usr/lib/python3.10/site-packages/flask_sqlalchemy/__init__.py", line 608, in get_options
    sa_url, options = self._sa.apply_driver_hacks(self._app, sa_url, options)
TypeError: cannot unpack non-iterable NoneType object

error: mbs-manager build_module_locally failed
error: log: None

Is this something I can work around?

Did you manage to solve this?
It happens to me also outside of Toolbox.

Unfortunately not yet. Sorry :frowning:

BTW look here 2025560 – cannot unpack non-iterable NoneType
It seems to me that such error is related to some issue with module-build-service or python3-flask-sqlalchemy

1 Like

I think this error only occurs on F35.
You can still run it without problems on F34 toolbox

I’m not sure if this will work for you, but couple days ago I was successfully build flatpak app (Helvum) on F35. Maybe you could try to install the same things required to build Helvum.

$ flatpak install org.gnome.{Platform,Sdk}//41 org.freedesktop.Sdk.Extension.rust-stable//21.08 org.freedesktop.Sdk.Extension.llvm12//21.08

Or maybe if you’re compiling your own app, maybe you could take a look the repository if there any particular setting to build it.

Note: I’m not aware if there a documentation about building flatpak in Fedora-Flatpak- Packaging Tutorial, and never follow instruction on that page.

Helvum repo: here