To help we need more information. How did you attempt to upgrade from 4.0 to 4.1? Did you follow these instructions?
Post-edit: Looking at the error output I would start problem solving by copying this line:
and doing an internet search. Such a search will return plenty of results and some of them relate to upgrading python and some package like a python-dnf package missing. If that is the case you probably can fix this by manually downloading the package and installing it with rpm. To see what dnf related packages are installed is simple, just run this command ‘rpm -qa | grep dnf’ and post the results here as code (</> icon). This is from a working hardware OM Lx 4.1 system fully upgraded:
$ rpm -qa | grep dnf
python-dnf-4.2.18-1.noarch
lib64dnf2-0.43.1-1.x86_64
python-dnfdaemon-0.3.19-3.noarch
dnf-4.2.18-1.noarch
python-libdnf-0.43.1-1.x86_64
python-dnf-plugin-rpmconf-4.0.8-3.noarch
python-dnf-plugins-core-4.0.13-1.noarch
dnf-conf-4.2.18-1.noarch
python-dnf-plugins-extras-common-4.0.8-3.noarch
dnf-yum-4.2.18-1.noarch
dnf-automatic-4.2.18-1.noarch
dnf-plugins-core-4.0.13-1.noarch
dnfdaemon-0.3.19-3.noarch
dnfdragora-1.1.2-5.x86_64