Trixie: Error 500 "POST" /yunohost/api/apps

What type of hardware are you using: VPS bought online
What YunoHost version are you running: 13.0.3
How are you able to access your server: The webadmin
SSH

Describe your issue

Hello,
I just installed YunoHost on a VPS.
All the configuration is OK.
When I try to add an application,
I get the following error message:

Erreur: “500”
Action: “POST” /yunohost/api/apps

Do you have any idea what the problem might be, or any advice?
Thanks

Share relevant logs or error messages

Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/moulinette/interfaces/api.py”, line 430, in process
ret = self.actionsmap.process(arguments, timeout=30, route=_route)
File “/usr/lib/python3/dist-packages/moulinette/actionsmap.py”, line 580, in process
return func(**arguments)
File “/usr/lib/python3/dist-packages/yunohost/log.py”, line 532, in func_wrapper
result = func(*args, **kwargs)
File “/usr/lib/python3/dist-packages/yunohost/app.py”, line 1462, in app_install
raise e
File “/usr/lib/python3/dist-packages/yunohost/app.py”, line 1455, in app_install
AppResourceManager(app_instance_name, wanted=manifest, current={}).apply(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
rollback_and_raise_exception_if_failure=True,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
operation_logger=operation_logger,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
action=“install”,
^^^^^^^^^^^^^^^^^
)
^
File “/usr/lib/python3/dist-packages/yunohost/utils/resources.py”, line 56, in apply
todos = list(self.compute_todos())
File “/usr/lib/python3/dist-packages/yunohost/utils/resources.py”, line 132, in compute_todos
wanted_resource = AppResourceClassesByType[name](infos, self.app, self)
File “/usr/lib/python3/dist-packages/yunohost/utils/resources.py”, line 466, in init
super().init({“sources”: properties}, *args, **kwargs)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/lib/python3/dist-packages/yunohost/utils/resources.py”, line 188, in init
YNH_DEBIAN_VERSION_ID”: str(debian_version_id()),
~~~~~~~~~~~~~~~~~^^
File “/usr/lib/python3/dist-packages/yunohost/utils/system.py”, line 63, in debian_version_id
return int(os_release()[“VERSION_ID”]) # type: ignore[return-value]
ValueError: invalid literal for int() with base 10: ‘“13”’

1 Like

It’s been discussed somewhere, the bug is fixed on GitHub, all you can do is wait I’m afraid :confused:

EDIT: relevant fix if you feel super brave to apply it on your machine by hand, the file to patch is in the log you’ve posted.

Edited file “/usr/lib/python3/dist-packages/yunohost/utils/system.py”

from:

61  @cache
62  def debian_version_id() -> str:
63        return int(os_release()["VERSION_ID"])  # type: ignore[return-value]

to:

61  @cache
62  def debian_version_id() -> Literal[12, 13]:
63      return int(os_release()["VERSION_ID"].strip('"'))

install now fails with:

  File "/usr/lib/python3/dist-packages/yunohost/utils/system.py", line 63, in debian_version_id
    return int(os_release()["VERSION_ID"].strip('"'))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: '"13"'

Manually edited /etc/os-release

From:
VERSION_ID=“13”

To:

VERSION_ID=13

and now the install proceeds but eventually fails with another, unrelated error
see https://paste.yunohost.org/raw/piwoyowufi

1 Like

Editing /etc/os-release is a questionable idea, but whatever works.

The error you’re getting was fixed on dev, you can bypass it by installing php8.4-fpm (sudo apt install php8.4-fpm) prior to installing this app.

Hello,

Thank you very much.

By modifying the file /usr/lib/python3/dist-packages/yunohost/utils/system.py,

I am now able to install apps.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.