problems getting mcomix a python app to run

Using OpenSUSE 13.2 x64
As the title says I can’t get mcomix a python 2.x app to run
https://software.opensuse.org/package/mcomix
If I start it from the startmenu it’s icon bounces a few seconds then disapears,
if I run it in a console I get this error:

Traceback (most recent call last):
  File "/usr/bin/mcomix", line 9, in <module>
    load_entry_point('mcomix==1.00', 'console_scripts', 'mcomix')()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 356, in load_entry_point return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2476, in load_entry_point return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2190, in load '__name__'])
  File "/usr/lib/python2.7/site-packages/mcomix/run.py", line 110, in <module> i18n.install_gettext()
  File "/usr/lib/python2.7/site-packages/mcomix/i18n.py", line 86, in install_gettext if pkg_resources.resource_exists('mcomix.messages', resource):
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 943, in resource_exists return get_provider(package_or_requirement).has_resource(resource_name)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 233, in get_provider __import__(moduleOrReq)
ImportError: No module named messages

The strange thing is if I get the source package, unpack it and execute mcomixstarter.py without installing it the app runs fine
I think I need an extra python library just not sure which one?

Although not completely uncertain,
IMO the type of error you got suggests to me that there has been a compilation error which resulted in missing code.

I’d be curious after you successfully ran as a python app, whether the packaged mcomix might work (ie Could running the source have installed anything new in your system?). In particular, the stdout you displayed suggests that gettext should be installed, but whether it’s just the runtime or any development packages might be required is unknown.

I’d recommend you report your findings in a bug report at https://bugzilla.opensuse.org

TSU

the thing is, python apps can be interpreted or compiled py or pyc files, I didn’t run content of the binary rpm I ran the py file from the src-rpm (I got it from the same home repo) I even re-made the rpm with rpmbuild, that didn’t work aether.
I checked the spec file to see if I’m missing something I’ve got all the requirements installed (python-gtk, python-pillow)
here’s a copy of the spec file and as far as I can tell thy py files don’t get compiled to binary pyc, so I really don’t get it?

#
# spec file for package mcomix
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           mcomix
Version:        1.00
Release:        0
Summary:        Comics Viewer
License:        GPL-2.0
Group:          Productivity/Graphics/Viewers
Url:            http://mcomix.sourceforge.net
Source0:        %{name}-%{version}.tar.bz2
BuildRequires:    python-setuptools
Requires:    python-Pillow
Requires:    python-gtk
Recommends:    unrar
BuildArch:    noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires(post):    shared-mime-info
Requires(postun): shared-mime-info
%if 0%{?suse_version}
BuildRequires:    fdupes
%endif

%description
Comics Viewer forked from comix.

%prep
%setup -q

%build

%install
%{__python} setup.py install --root "%{buildroot}" --prefix "%{_prefix}" --single-version-externally-managed

ls %{buildroot}%{python_sitelib}/mcomix/messages/*/LC_MESSAGES/mcomix.mo | \
  sed 's@%{buildroot}\(%{python_sitelib}/mcomix/messages/\(^/]\+\)/LC_MESSAGES/mcomix.mo\)@%lang(\2) \1@' > %{name}.lang

%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_datadir}/icons
%fdupes -s %{buildroot}%{python_sitelib}/mcomix
%fdupes -s %{buildroot}%{python_sitelib}/mcomix-*
%endif

%post
%mime_database_post

%postun
%mime_database_postun

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc
%{_bindir}/mcomix
%{python_sitelib}/mcomix*
%exclude %{python_sitelib}/mcomix/messages
%dir %{python_sitelib}/mcomix/messages
%dir %{python_sitelib}/mcomix/messages/*
%{_datadir}/applications/mcomix.desktop
%{_datadir}/icons/hicolor
%{_datadir}/mime/packages/mcomix.xml
%{_mandir}/man1/mcomix*

%changelog

I checked I have gettext installed, including the gettext-runtime, just to be sure I installed the 32 bit runtime and python-polib but still I can’t get the app to run.
About reporting it to bugzilla, well this application can only be found in user home: repositories and it’s not officially supported by opensuse, I’m not really sure it would make a sence reporting an application that’s not part of the distribution?
I was wondering if anybody got it to install properly as there are 4 home reposetories hosting it.
I’ll do some googling about the above errors and if I find a fix I’ll report back.

Maybe you need the devel version. That is often needed when pasting different packages together

OK trying to install gettext-devel

sudo zypper in gettext-devel
Loading repository data...
Reading installed packages...
'gettext-devel' not found in package names. Trying capabilities.
'gettext-tools' providing 'gettext-devel' is already installed.
Resolving package dependencies...

There are a few things bothering me with this app, the 1st is that it runs fine if it’s not installed, the 2nd is that comix the python app mcomix is forked from installs and runs fine.
I’m thinking maybe the problem is python-setuptools_5.4.1 that’s part of the main OSS repo is too old the one hosted at pythons repo is 18.1
I’ll add dev:languages: python and see what happens (if I don’t break my system first)

found the reason for the error, maybe it can be of help to someone else.
apparently a bad spec file, it didn’t include the messages directory containing the translations in the rpm file, I copied it manually and now the app works.

Maybe if you send me an e-mail or file a bug, I could fix it for everyone.

I’m not sure who would I send it to, as that package is in a user repo, anyhow I tweaked the spec file and now it runs fine, I even re-build it for Leap.
there are 3 people hosting mcomix in OBS and none of them worked,
actually an mcomix dev helped me find the bug
http://sourceforge.net/p/mcomix/discussion/1199430/thread/0979d529/

I tweaked one of the spec files, and build it with the updated version 1.01.
anyone know how to ask for a package to get in the main repo as comix is quite old and mcomix development seams more active.
ps why is subprocess32 missing in opensuse?

this is the tweaked spec file I used to build for Leap with mcomix 1.01 I had an
http://sourceforge.net/projects/mcomix/files/MComix-1.01/mcomix-1.01.tar.bz2

#
# spec file for package mcomix
#
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%define _unpackaged_files_terminate_build 0 

Name:           mcomix
Version:        1.01
Release:        1.00
Summary:        Comics Viewer
License:        GPL-2.0
Group:          TBD
Url:            http://sourceforge.net/p/mcomix/wiki/Home/
Source0:        %{name}-%{version}.tar.bz2
BuildRequires:    python-setuptools
Requires:    python-Pillow
Requires:    python-gtk
Recommends:    unrar
BuildArch:    noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires(post):    shared-mime-info
Requires(postun): shared-mime-info
%if 0%{?suse_version}
BuildRequires:    fdupes
%endif

%description
Comics Viewer forked from comix.

%prep
%setup -q

%build

%install
python setup.py install --root "%{buildroot}" --prefix "%{_prefix}" --single-version-externally-managed
ls %{buildroot}%{python_sitelib}/mcomix/messages/*/LC_MESSAGES/mcomix.mo | \
  sed 's@%{buildroot}\(%{python_sitelib}/mcomix/messages/\(^/]\+\)/LC_MESSAGES/mcomix.mo\)@%lang(\2) \1@' > %{name}.lang
%if 0%{?suse_version}
%fdupes -s %{buildroot}%{_datadir}/icons
%fdupes -s %{buildroot}%{python_sitelib}/mcomix
%fdupes -s %{buildroot}%{python_sitelib}/mcomix-*
%endif

%post
%mime_database_post

%postun
%mime_database_postun

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc
%{_bindir}/mcomix
%{python_sitelib}/mcomix*
%dir %{python_sitelib}/mcomix/messages
%dir %{python_sitelib}/mcomix/messages/*
%{_datadir}/applications/mcomix.desktop
%{_datadir}/icons/hicolor
%{_datadir}/mime/packages/mcomix.xml
%{_mandir}/man1/mcomix*

%changelog
* Thu Jul 24 2014 sleep_walker@suse.cz
- remove windows-fix.patch as it is not needed after update of
  python-setuptools
* Thu Jul 24 2014 sleep_walker@suse.cz
- let there be mcomix!
- add windows-fix.patch as python-setuptools doesn't take it correctly
  otherwise


I had an unpackaged_files error and I didn’t want to go searching for it in the build process so I used
%define _unpackaged_files_terminate_build 0

lol @sleep_walker I didn’t notice you wore the maintainer
you had an option to remove the messages dir and that caused the problems
as software.opensuse.org seams to be down for me I can’t find the original spec file.

my brain is running low, the original spec file is a few replies above, the problem was (is fixed now) this
%exclude %{python_sitelib}/mcomix/messages
mcomix from multimedia:apps should run fine now (have not tested it yet)