Bug 797263 - [abrt] mypaint-1.0.0-2.fc17: mypaint:108:get_paths:ImportError: No module named lib
Summary: [abrt] mypaint-1.0.0-2.fc17: mypaint:108:get_paths:ImportError: No module nam...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mypaint
Version: 17
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Christoph Wickert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:92b8f8ba517a031470eb52f5626...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-24 17:38 UTC by Joshua
Modified: 2012-10-10 16:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-10-10 16:30:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joshua 2012-02-24 17:38:52 UTC
libreport version: 2.0.8
abrt_version:   2.0.7
cmdline:        python2.7 /bin/mypaint
comment:        Start mypaint from KDE program menu 'unable to locate module lib'
executable:     /bin/mypaint
kernel:         3.3.0-0.rc4.git1.4.fc17.x86_64
reason:         mypaint:108:get_paths:ImportError: No module named lib
time:           Fri 24 Feb 2012 09:31:47 AM PST
uid:            1000
username:       josh

backtrace:
:mypaint:108:get_paths:ImportError: No module named lib
:
:Traceback (most recent call last):
:  File "/bin/mypaint", line 164, in <module>
:    datapath, extradata, confpath, localepath = get_paths()
:  File "/bin/mypaint", line 108, in get_paths
:    from lib import mypaintlib
:ImportError: No module named lib
:
:Local variables in innermost frame:
:dir_install: u'/bin'
:join: <function join at 0x7f0cfee72140>
:lib_shared: 'share/mypaint/'
:localepath: u'/share/locale'
:libpath_compiled: u'/lib64/mypaint/'
:extradata: u'/share'
:s: '/bin/mypaint'
:libpath: u'/share/mypaint/'
:prefix: u'/'
:scriptdir: u'/bin'
:lib_compiled: 'lib64/mypaint/'

Comment 1 Christoph Wickert 2012-02-25 02:53:34 UTC
Thanks for submitting this crash report.

Does 'rpm -V mypaint mypaint-data' produce any output?

Comment 2 Christoph Wickert 2012-03-21 17:53:32 UTC
Hey, can you please get back to me?

Comment 3 Christoph Wickert 2012-06-05 08:36:09 UTC
As I received no feedback from you, I am closing this bug now. Feel free to reopen it when you can provide the info I need.

Comment 4 Josh Trutwin 2012-09-25 14:48:37 UTC
Is it possible to reopen this?  I'm having the exact same problem on Fedora 17 - the rpm -V command produces no output on my system.

Thank you,

Josh

Comment 5 Christoph Wickert 2012-09-26 08:22:43 UTC
Sure we can reopen this, but frankly speaking I have no idea why the lib cannot be imported. It *is* definitely there.

Thomas, I recall we once had a bug report where python did not import something for some reason I don't remember. Can you help me out?

Comment 6 Thomas Spura 2012-09-26 09:04:39 UTC
(In reply to comment #5)
> Sure we can reopen this, but frankly speaking I have no idea why the lib
> cannot be imported. It *is* definitely there.
> 
> Thomas, I recall we once had a bug report where python did not import
> something for some reason I don't remember. Can you help me out?

Uh... There are so many python bugs ;)

I just tried to reproduce this, without success. It's working fine here on f16 (both versions, the current one of f16 and recompiled the one from rawhide).

After a dive deep in, it seems mypaint must be called with /usr/bin/mypaint or mypaint doesn't know that it's installed properly. When being called with "/usr/mypaint" it thinks that prefix is / and not /usr:

$ /bin/mypaint 

We are not correctly installed or compiled!
script: "/bin/mypaint"
deduced prefix: "/"
lib_shared: "/share/mypaint/"
lib_compiled: "/lib64/mypaint/"

Traceback (most recent call last):
  File "/bin/mypaint", line 164, in <module>
    datapath, extradata, confpath, localepath = get_paths()
  File "/bin/mypaint", line 108, in get_paths
    from lib import mypaintlib
ImportError: No module named lib

Christoph, it is possible to change the behaviour of KDE, so it properly opens /usr/bin/mypaint?

Comment 7 Josh Trutwin 2012-09-26 13:36:51 UTC
Confirmed - the problem exists only when running /bin/mypaint, not /usr/bin/mypaint.  In my env the PATH has /bin before /usr/bin.  Also, I'm not sure if this changed in f17 or earlier but /bin is a link to /usr/bin so cannot just the /bin version.

For now I will just adjust our environment to run the /usr/bin/mypaint explicitly.

Thanks,

Josh

Comment 8 Harald Hoyer 2012-09-26 14:21:52 UTC
/bin/mypaint:
...
    # this script is installed as $prefix/bin. We just need $prefix to continue.
    #pwd=os.getcwd() # why????
    #dir_install=os.path.normpath(join(pwd,scriptdir)) # why????
    dir_install=scriptdir # same, except maybe if scriptdir is relative...
...

And I would do:

    dir_install = os.path.realpath(scriptdir)


which should fix the issue.

Comment 9 Christoph Wickert 2012-09-26 14:43:16 UTC
Thomas, hold your horses please, I think Harald's patch is better than yours.

Comment 10 Thomas Spura 2012-09-26 14:50:45 UTC
I just fixed it differently, but your solution is better seemed better.
A few lines above scriptdir already needs the os.path.realpath instead.

Update on the way.

Thanks!

Comment 11 Fedora Update System 2012-09-26 18:28:40 UTC
mypaint-1.0.0-4.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/mypaint-1.0.0-4.fc18

Comment 12 Fedora Update System 2012-09-26 18:28:58 UTC
mypaint-1.0.0-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/mypaint-1.0.0-4.fc17

Comment 13 Fedora Update System 2012-09-26 21:21:57 UTC
Package mypaint-1.0.0-4.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mypaint-1.0.0-4.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-14845/mypaint-1.0.0-4.fc18
then log in and leave karma (feedback).

Comment 14 Josh Trutwin 2012-10-04 20:17:42 UTC
curious how long it'll take before this passes QA and can be applied on FC 17?

thank you!

Josh

Comment 15 Christoph Wickert 2012-10-04 20:51:24 UTC
3-4 more days. The update needs to be in updates-testing for a week unless there are 3 testers that give positive feedback.


Note You need to log in before you can comment on or make changes to this bug.