Bug 500459 (bkchem-0.13)

Summary: bkchem program does not start and end up with the error message.
Product: [Fedora] Fedora Reporter: Piotr Wawrzyniak <wopozka>
Component: python-pmwAssignee: Tim Fenn <tim.fenn>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 10CC: henriquecsj, mtasaka, terje.rosten, tim.fenn
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-07-16 17:39:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
workaround for this issue none

Description Piotr Wawrzyniak 2009-05-12 19:32:37 UTC
Description of problem:
The bkchem program does not start. When started from the console the bellow error is produced: 
[piotr@chpc-pw41 ~]$ bkchem
could not load module pdf_piddle
could not load module ps_piddle
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/bkchem/bkchem.py", line 164, in <module>
    myapp.initialize()
  File "/usr/lib/python2.5/site-packages/bkchem/main.py", line 100, in initialize
    self.init_menu()
  File "/usr/lib/python2.5/site-packages/bkchem/main.py", line 305, in init_menu
    self.menu.addmenuitem( menu, 'command', label=label, accelerator=accelerator, statusHelp=help, command=command)
  File "/usr/lib/python2.5/site-packages/Pmw/Pmw_1_3/lib/PmwMenuBar.py", line 155, in addmenuitem
    self._addHotkeyToOptions(menuName, kw, 'label', traverseSpec)
  File "/usr/lib/python2.5/site-packages/Pmw/Pmw_1_3/lib/PmwMenuBar.py", line 204, in _addHotkeyToOptions
    label = str(menu.entrycget(item, textKey))
UnicodeEncodeError: 'ascii' codec can't encode character u'\xf3' in position 3: ordinal not in range(128)

Bkchem starts without any problem if downloaded from the homepage and run from the local folder.

Version-Release number of selected component (if applicable):bkchem-0.13.0-3.fc10.noarch


How reproducible:

Reproducible in each case.

Steps to Reproduce:
1. just run bkchem from the console.
  
Actual results: does not start, produces error message

Comment 1 Henrique C. S. Junior 2009-05-12 23:33:53 UTC
Hi,
I'm unable to reproduce this bug. BKChem is running fine here and, to be sure, I've asked some friends to install it too.
Are you using the latest version of python-oasa (0.13.1-1)?
Some other guys have told me that after an update they're having troubles running some python applications (yumex is an example).
Please, try to run yumex and see if you have an error.

Comment 2 Piotr Wawrzyniak 2009-05-13 06:11:38 UTC
Hi,
I am using python-oasa-0.13.1-1.fc10.noarch, yumex starts pretty well, rpm -Va does not show any errors. The system on my computer is quite fresh (I installed it just a week ago on a empty disk, and then installed all upgrades). Is it possible that this is a hardware problem, sometimes I have funny issues with my laptop (freezing etc)?

Comment 3 Mamoru TASAKA 2009-05-13 09:53:47 UTC
LANG=pl.UTF-8 bkchem reproduces this issue on F-11/10.
Also LANG={fr_FR,de_DE}.UTF-8 reproduces this.

Comment 4 Mamoru TASAKA 2009-05-13 10:10:45 UTC
Once changing to python-pmw .

(In reply to comment #0)
> Bkchem starts without any problem if downloaded from the homepage and run from
> the local folder.

This is because perhaps bkchem downloaded from its project
homepage uses its internal python-pmw but Fedora's bkchem
uses system-wide python-pmw.

Comment 5 Mamoru TASAKA 2009-05-13 10:18:31 UTC
Created attachment 343742 [details]
workaround for this issue

Hi, Tim:

The attached patch resolves this issue.
What I am wondering for now is that as I don't know
what type entrycget(item, textKey) (or so) in tkinter
(perhaps) are expected to return, so I am not sure
which component should be modified to resolve this issue,
python-pmw or bkchem.

Comment 6 Henrique C. S. Junior 2009-05-13 11:09:27 UTC
This is really strange. I'll try one clean install of all the components to figure out if the problem is in python-pmw or in bkchem.

Comment 7 Piotr Wawrzyniak 2009-05-13 12:18:26 UTC
I got the answer from Beda Kosata, the author of BKChem. I think this might clear something.

#v+
The problem here is that Pmw is buggy (it does not handle unicode in
menus properly). I distribute my own fixed version of Pmw with BKChem
because the Pmw project was dead at the time I discovered it and noone
seemed to be interested in my patch.
(Now Pmw seems to be revived, but I am not sure if they are going to fix
it either).
#v-

So it looks like Pmw problem.

Comment 8 Henrique C. S. Junior 2009-05-13 12:48:03 UTC
(In reply to comment #7)
> I got the answer from Beda Kosata, the author of BKChem. I think this might
> clear something.
> 
> #v+
> The problem here is that Pmw is buggy (it does not handle unicode in
> menus properly). I distribute my own fixed version of Pmw with BKChem
> because the Pmw project was dead at the time I discovered it and noone
> seemed to be interested in my patch.
> (Now Pmw seems to be revived, but I am not sure if they are going to fix
> it either).
> #v-
> 
> So it looks like Pmw problem.
So, I'll contact Beda and see if we can use his patch - at least - in Fedora's Pmw.
It explains, also, why BKChem is working well in my machines: since we don't have an translated version to portuguese, we're using En-US.

Comment 9 Tim Fenn 2009-05-13 17:00:52 UTC
OK, I can apply Mamoru's patch for now.  I took a quick look at bkchem and it seems it combines several pmw classes/files into one big Pmw.py file, so its a bit tricky for me to find/extract all the differences to the main Pmw package - perhaps Beda has patches to upstream, that would be ideal!

Comment 10 Fedora Update System 2009-05-13 23:18:13 UTC
python-pmw-1.3.2-6.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/python-pmw-1.3.2-6.fc10

Comment 11 Fedora Update System 2009-05-13 23:18:18 UTC
python-pmw-1.3.2-8.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/python-pmw-1.3.2-8.fc11

Comment 12 Henrique C. S. Junior 2009-05-22 18:04:35 UTC
Does this update in python-pmw fixed this bug?

Comment 13 Piotr Wawrzyniak 2009-05-22 18:51:07 UTC
I have just checked, and bkchem starts normally, except that piddle modules can not be loaded. It prints the following information:
could not load module pdf_piddle
could not load module ps_piddle

and then there is no piddle export. When you start bkchem downloaded from the program webpage the piddle export works fine. Except this bkchem starts normally.

Comment 14 Henrique C. S. Junior 2009-05-22 19:00:26 UTC
Piddle was excluded from our RPM because of some Legal issues. BKChem do not really need it and Beda told me that in the future Piddle will be excluded from the upstream version of BKChem too.
So, if it's all working OK I'll close this bug.

Comment 15 Henrique C. S. Junior 2009-05-22 21:06:35 UTC
This bug is, now, closed and the issue was not caused by bkchem but by python-pmw. After an update in python-pmw this problem was solved.

Comment 16 Mamoru TASAKA 2009-05-23 00:49:16 UTC
Please don't close this as "NOTABUG" as
- this is really a bug
- and the componet is already changed to python-pmw

This bug should be closed when the fixed python-pmw is pushed
to stable (currently it is in testing)

Comment 17 Tim Fenn 2009-05-23 01:13:48 UTC
(In reply to comment #16)
> 
> This bug should be closed when the fixed python-pmw is pushed
> to stable (currently it is in testing)  

Yeah, if you've tested it and it works OK, give it a karma point!  :)

Comment 18 Mamoru TASAKA 2009-05-23 04:20:31 UTC
(In reply to comment #17)
> Yeah, if you've tested it and it works OK, give it a karma point!  :)  

Already :)

Comment 19 Fedora Update System 2009-06-02 14:17:29 UTC
python-pmw-1.3.2-8.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2009-06-02 14:19:43 UTC
python-pmw-1.3.2-6.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Tim Fenn 2009-07-15 22:57:56 UTC
OK to close?

Comment 22 Henrique C. S. Junior 2009-07-16 10:28:05 UTC
Yes. ;)