I still have to comment out this line to prevent jbrout refusing to display - is it in the bugs list?

34 views
Skip to first unread message

Chris Green

unread,
Sep 10, 2013, 6:32:44 AM9/10/13
to jbr...@googlegroups.com
I just installed jbrout on a new xubuntu 13.04 system, I already have it
and use it on an xubuntu 12.10 system.

As installed jbrout still gives me the following error when I double
click on any image:-

Traceback (most recent call last):
File "/usr/lib/jbrout/jbrout.py", line 1826, in
on_selecteur_mouseClick
self.call_winshow(self.tbl.items,
self.tbl.items.index(self.tbl.getSelected()[-1]),
self.tbl.getSelected())
File "/usr/lib/jbrout/jbrout.py", line 1976, in call_winshow
w=WinShow(l,i,isInfo,isModify, selected)
File "/usr/lib/jbrout/libs/gladeapp.py", line 125, in __init__
obj(*(args),**(dargs))
File "/usr/lib/jbrout/jbrout/winshow.py", line 91, in init
self.taglist = TagList(self.on_remove_tag)
File "/usr/lib/jbrout/jbrout/winshow.py", line 29, in __init__
self.__tags= dict(JBrout.tags.getAllTags())
File "/usr/lib/jbrout/jbrout/db.py", line 1014, in getAllTags
l.sort(cmp= lambda x,y: cmp(x[0].lower(),y[0].lower()))
File "/usr/lib/jbrout/jbrout/db.py", line 1014, in <lambda>
l.sort(cmp= lambda x,y: cmp(x[0].lower(),y[0].lower()))
AttributeError: 'NoneType' object has no attribute 'lower'


So to make jbrout work on the new 13.04 system I had to comment out line
1014 of db.py as I had already done on the 12.10 system.

I know I reported this quite a long while ago (when I first started
using jbrout) but I was wondering if it had got into the bug list or
whatever.

--
Chris Green

Matěj Cepl

unread,
Sep 10, 2013, 7:32:17 AM9/10/13
to jbr...@googlegroups.com
On 09/10/2013 12:32 PM, Chris Green wrote:
> So to make jbrout work on the new 13.04 system I had to comment out line
> 1014 of db.py as I had already done on the 12.10 system.
>
> I know I reported this quite a long while ago (when I first started
> using jbrout) but I was wondering if it had got into the bug list or
> whatever.

This is the only official list of issues
https://code.google.com/p/jbrout/issues/list ... if it isn't there, I am
afraid it got lost. I am sorry.

Would you be so kind (if you have Google Account it should be easy) and
file a ticket there, and attach example picture which leads to this
traceback? I cannot reproduce it here.

Best,

Matěj

--
http://www.ceplovi.cz/matej/, Jabber: mc...@ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

Our lives are spectacles of powerlessness.
-- Richard Rohr

signature.asc

Matěj Cepl

unread,
Sep 11, 2013, 9:36:55 AM9/11/13
to jbr...@googlegroups.com
On 09/10/2013 12:32 PM, Chris Green wrote:
> As installed jbrout still gives me the following error when I double
> click on any image:-
>
> Traceback (most recent call last):
> File "/usr/lib/jbrout/jbrout.py", line 1826, in
> on_selecteur_mouseClick
> self.call_winshow(self.tbl.items,
> self.tbl.items.index(self.tbl.getSelected()[-1]),
> self.tbl.getSelected())
> File "/usr/lib/jbrout/jbrout.py", line 1976, in call_winshow
> w=WinShow(l,i,isInfo,isModify, selected)
> File "/usr/lib/jbrout/libs/gladeapp.py", line 125, in __init__
> obj(*(args),**(dargs))
> File "/usr/lib/jbrout/jbrout/winshow.py", line 91, in init
> self.taglist = TagList(self.on_remove_tag)
> File "/usr/lib/jbrout/jbrout/winshow.py", line 29, in __init__
> self.__tags= dict(JBrout.tags.getAllTags())
> File "/usr/lib/jbrout/jbrout/db.py", line 1014, in getAllTags
> l.sort(cmp= lambda x,y: cmp(x[0].lower(),y[0].lower()))
> File "/usr/lib/jbrout/jbrout/db.py", line 1014, in <lambda>
> l.sort(cmp= lambda x,y: cmp(x[0].lower(),y[0].lower()))
> AttributeError: 'NoneType' object has no attribute 'lower'

I cannot reproduce it here.

Could you try SVN version, please?

Just do (somewhere in /tmp or outside of you normal jbrout directory)

svn checkout http://jbrout.googlecode.com/svn/trunk/ jbrout
cd jbrout/jbrout # yes, it is two dirs deep
python ./jbrout.py

Could you reproduce the issue? Could you post a new ticket with the new
backtrace (the line numbers above are not valid according to the current
checkout), please?

Thank you,

Matěj Cepl

--
http://www.ceplovi.cz/matej/, Jabber: mc...@ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

For a successful technology, reality must take precedence over
public relations, for nature cannot be fooled.
-- R. P. Feynman's concluding sentence
in his appendix to the Challenger Report

signature.asc

Chris Green

unread,
Sep 11, 2013, 12:55:16 PM9/11/13
to jbr...@googlegroups.com
Will do (later this evening if I can find time).


> Just do (somewhere in /tmp or outside of you normal jbrout directory)
>
> svn checkout http://jbrout.googlecode.com/svn/trunk/ jbrout
> cd jbrout/jbrout # yes, it is two dirs deep
> python ./jbrout.py
>
> Could you reproduce the issue? Could you post a new ticket with the new
> backtrace (the line numbers above are not valid according to the current
> checkout), please?
>
Well it seems to happen on every system where I installed jbrout (all
running xubuntu, some 12.10, some 13.04). I'm running jbrout version
0.3.345.


--
Chris Green

Chris Green

unread,
Sep 11, 2013, 1:07:12 PM9/11/13
to jbr...@googlegroups.com
On Wed, Sep 11, 2013 at 03:36:55PM +0200, Matěj Cepl wrote:
Yes, error is exactly the same with the svn version:-

...
...
...
A jbrout/jbrout/po/it/LC_MESSAGES/jbrout.po
A jbrout/.gitignore
A jbrout/setup.py
A jbrout/readme.txt
A jbrout/MANIFEST.in
Checked out revision 359.
chris$ cd jbrout/jbrout
/tmp/jbrout/jbrout
chris$ ls
__init__.py data jbrout jbrout.py libs plugins po
chris$ ./jbrout.py
Traceback (most recent call last):
File "./jbrout.py", line 1843, in on_selecteur_mouseClick
self.call_winshow(self.tbl.items,
self.tbl.items.index(self.tbl.getSelected()[-1]),
self.tbl.getSelected())
File "./jbrout.py", line 1993, in call_winshow
w = WinShow(l, i, isInfo, isModify, selected)
File "/tmp/jbrout/jbrout/libs/gladeapp.py", line 125, in __init__
obj(*(args),**(dargs))
File "/tmp/jbrout/jbrout/jbrout/winshow.py", line 98, in init
self.taglist = TagList(self.on_remove_tag)
File "/tmp/jbrout/jbrout/jbrout/winshow.py", line 34, in __init__
self.__tags = dict(JBrout.tags.getAllTags())
File "/tmp/jbrout/jbrout/jbrout/db.py", line 1035, in getAllTags
l.sort(cmp=lambda x, y: cmp(x[0].lower(), y[0].lower()))
File "/tmp/jbrout/jbrout/jbrout/db.py", line 1035, in <lambda>
l.sort(cmp=lambda x, y: cmp(x[0].lower(), y[0].lower()))
AttributeError: 'NoneType' object has no attribute 'lower'


Commenting out line 1035 in db.py gets rid of the error.


--
Chris Green

Matěj Cepl

unread,
Sep 11, 2013, 2:26:19 PM9/11/13
to jbr...@googlegroups.com
On 09/11/2013 07:07 PM, Chris Green wrote:
> Commenting out line 1035 in db.py gets rid of the error.

There must be something wrong somewhere.

I have downloaded
http://jbrout.free.fr/download/debian/binary/jbrout_0.3.345_all.deb,
slit it up in Fedora (which was an interesting feat in itself ;)) and
then I see this:

matej@wycliff: usr$ echo $(readlink -f $(find . -name db.py))
/tmp/deb/usr/lib/jbrout/jbrout/db.py
matej@wycliff: usr$ tail -n +1030 $(find . -name db.py)|head
#~ def update(self, tg):
#~ nc = self.dom.selectSingleNode("//catg[@name='IMPORTEDTAGS']")
#~ if not nc:
#~ nc=self.dom.createElement("catg")
#~ nc.setAttribute( "name","IMPORTEDTAGS")

#~ newtags=False
#~ st = self.getTags()
#~ for i in tg:
#~ if i in st:
matej@wycliff: usr$

I believe you have to have something changed somewhere. Could you give
me output of the command

tail -n +1030 /usr/lib/jbrout/jbrout/db.py|head

please? Also a proper patch between the version of db.py from the DEB
archive and what you have on your disc would be helpful.

Thank you,

Matěj Cepl

--
http://www.ceplovi.cz/matej/, Jabber: mc...@ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

A man once asked Mozart how to write a symphony. Mozart told him
to study at the conservatory for six or eight years, then
apprentice with a composer for four or five more years, then
begin writing a few sonatas, pieces for string quartets, piano
concertos, etc. and in another four or five years he would be
ready to try a full symphony. The man said, "But Mozart, didn't
you write a symphony at age eight?" Mozart replied, "Yes, but
I didn't have to ask how."
-- ripped from another sig

signature.asc

Chris Green

unread,
Sep 11, 2013, 4:56:58 PM9/11/13
to jbr...@googlegroups.com
On Wed, Sep 11, 2013 at 08:26:19PM +0200, Matěj Cepl wrote:
> On 09/11/2013 07:07 PM, Chris Green wrote:
> > Commenting out line 1035 in db.py gets rid of the error.
>
> There must be something wrong somewhere.
>
> I have downloaded
> http://jbrout.free.fr/download/debian/binary/jbrout_0.3.345_all.deb,

Ah, that's the old/default version I have installed from the Ubuntu
repositories, the line I have commented out on *that* version is the one
I originally reported, line 1014.


> slit it up in Fedora (which was an interesting feat in itself ;)) and
> then I see this:
>
> matej@wycliff: usr$ echo $(readlink -f $(find . -name db.py))
> /tmp/deb/usr/lib/jbrout/jbrout/db.py
> matej@wycliff: usr$ tail -n +1030 $(find . -name db.py)|head
> #~ def update(self, tg):
> #~ nc = self.dom.selectSingleNode("//catg[@name='IMPORTEDTAGS']")
> #~ if not nc:
> #~ nc=self.dom.createElement("catg")
> #~ nc.setAttribute( "name","IMPORTEDTAGS")
>
> #~ newtags=False
> #~ st = self.getTags()
> #~ for i in tg:
> #~ if i in st:
> matej@wycliff: usr$
>
Yes, my default installed version says exactly the same:-

root@chris:/usr/lib/jbrout/jbrout# tail -n +1030 $(find . -name
db.py)|head
#~ def update(self, tg):
#~ nc = self.dom.selectSingleNode("//catg[@name='IMPORTEDTAGS']")
#~ if not nc:
#~ nc=self.dom.createElement("catg")
#~ nc.setAttribute( "name","IMPORTEDTAGS")

#~ newtags=False
#~ st = self.getTags()
#~ for i in tg:
#~ if i in st:

> I believe you have to have something changed somewhere. Could you give
> me output of the command
>
> tail -n +1030 /usr/lib/jbrout/jbrout/db.py|head
>
See above, identical with yours.


> please? Also a proper patch between the version of db.py from the DEB
> archive and what you have on your disc would be helpful.
>


Just to clarify:-

On version 0.3.345 (which is the version I have installed on all my
systems from the Ubuntu archives) I have to comment out line 1014 in
db.py to fix the error.

On version 0.3.359 which I downloaded using SVN as you requested I
have to comment out line 1035 of db.py to fix the error. This is
functionally the same line as the one I commented out in 0.3.345.

I get exactly the same error on version 0.3.359 as I do on version
0.3.345, just the line number in db.py is different but the line in both
cases is:-

l.sort(cmp= lambda x,y: cmp(x[0].lower(),y[0].lower()))


--
Chris Green

Matěj Cepl

unread,
Sep 12, 2013, 4:37:32 AM9/12/13
to jbr...@googlegroups.com
On 09/11/2013 10:56 PM, Chris Green wrote:
> I get exactly the same error on version 0.3.359 as I do on version
> 0.3.345, just the line number in db.py is different but the line in both
> cases is:-
>
> l.sort(cmp= lambda x,y: cmp(x[0].lower(),y[0].lower()))

I don't understand how you can get None in these parameters. Could we
make two tests, please?

First get the fresh copy of jbrout from my repo. I.e.,

1) cd <some-empty-directory-for-testing>
2) git clone git://gitorious.org/jbrout/jbrout.git
3) cd jbrout/jbrout/ && git checkout NoneGetAllTags
4) ./jbrout.py |&tee jbrout-testing-log.txt
5) reproduce the crash. Does it happen? Attach please
jbrout-testing-log.txt, and ~/.local/share/jbrout/db.xml (probably gzip
it before, it may be quite large).

Now, the second test:

1) Leave jbrout
2) move ~/.jbrout and ~/.local/share/jbrout somewhere else
3) return to the directory where you started jbrout.py from in the last case
4) ./jbrout.py |&tee another-jbrout-testing-log.txt
5) add your ~/Pictures folder again (or wherever your pictures are stored)
6) wait
7) does the problem reproduces again? Attach
another-jbrout-testing-log.txt and ~/.local/share/jbrout/db.xml, please.

Thank you,

Matěj

--
http://www.ceplovi.cz/matej/, Jabber: mc...@ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

And religious texts are a bit like software standards, the
interpretation is always the tricky and complicated bit.
-- Alan Cox

signature.asc

Matěj Cepl

unread,
Sep 12, 2013, 4:57:23 AM9/12/13
to jbr...@googlegroups.com
On 09/11/2013 10:56 PM, Chris Green wrote:
> I get exactly the same error on version 0.3.359 as I do on version
> 0.3.345, just the line number in db.py is different but the line in both
> cases is:-
>
> l.sort(cmp= lambda x,y: cmp(x[0].lower(),y[0].lower()))

Also, I have finally found the answer to your question in %subject%? It
is known bug https://code.google.com/p/jbrout/issues/detail?id=208 and I
really wonder how it could survive for so long without being resolved.

Best,

Matěj

--
http://www.ceplovi.cz/matej/, Jabber: mc...@ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

signature.asc

Chris Green

unread,
Sep 12, 2013, 9:59:02 AM9/12/13
to jbr...@googlegroups.com
On Thu, Sep 12, 2013 at 10:57:23AM +0200, Matěj Cepl wrote:
> On 09/11/2013 10:56 PM, Chris Green wrote:
> > I get exactly the same error on version 0.3.359 as I do on version
> > 0.3.345, just the line number in db.py is different but the line in both
> > cases is:-
> >
> > l.sort(cmp= lambda x,y: cmp(x[0].lower(),y[0].lower()))
>
> Also, I have finally found the answer to your question in %subject%? It
> is known bug https://code.google.com/p/jbrout/issues/detail?id=208 and I
> really wonder how it could survive for so long without being resolved.
>
Ah, good, so at least it's a known bug. Do you still want me to do the
things you outlined in your previous posting? I can't at the moment
because I'm away from home, they'll have to wait until the weekend.

--
Chris Green

Matěj Cepl

unread,
Sep 12, 2013, 10:59:50 AM9/12/13
to jbr...@googlegroups.com
On 09/12/2013 03:59 PM, Chris Green wrote:
> Ah, good, so at least it's a known bug. Do you still want me to do the
> things you outlined in your previous posting? I can't at the moment
> because I'm away from home, they'll have to wait until the weekend.

Yes, please ... without your help I cannot move with this bug. My
crystal ball is in the repair, and I am not able to reproduce the issue
here, so without your help the bug will probably stay in the same state
as before.

Thank you,

Matěj

--
http://www.ceplovi.cz/matej/, Jabber: mc...@ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

Las cosas claras y el chocolate espeso.
(Ideas should be clear and chocolate thick.)
-- Spanish proverb

signature.asc

Chris Green

unread,
Sep 13, 2013, 3:11:13 PM9/13/13
to jbr...@googlegroups.com
On Thu, Sep 12, 2013 at 10:37:32AM +0200, Matěj Cepl wrote:
> On 09/11/2013 10:56 PM, Chris Green wrote:
> > I get exactly the same error on version 0.3.359 as I do on version
> > 0.3.345, just the line number in db.py is different but the line in both
> > cases is:-
> >
> > l.sort(cmp= lambda x,y: cmp(x[0].lower(),y[0].lower()))
>
> I don't understand how you can get None in these parameters. Could we
> make two tests, please?
>
> First get the fresh copy of jbrout from my repo. I.e.,
>
> 1) cd <some-empty-directory-for-testing>
> 2) git clone git://gitorious.org/jbrout/jbrout.git
> 3) cd jbrout/jbrout/ && git checkout NoneGetAllTags
> 4) ./jbrout.py |&tee jbrout-testing-log.txt
> 5) reproduce the crash. Does it happen? Attach please
> jbrout-testing-log.txt, and ~/.local/share/jbrout/db.xml (probably gzip
> it before, it may be quite large).
>
OK, I've done this. Files attached as test1-jbrout-testing-log.txt
and test1-db.xml.gz. ..... and yes I still get the same error.


> Now, the second test:
>
> 1) Leave jbrout
> 2) move ~/.jbrout and ~/.local/share/jbrout somewhere else

There isn't a ~/.jbrout, I've moved the other one.


> 3) return to the directory where you started jbrout.py from in the last case
> 4) ./jbrout.py |&tee another-jbrout-testing-log.txt
> 5) add your ~/Pictures folder again (or wherever your pictures are stored)
> 6) wait
> 7) does the problem reproduces again? Attach
> another-jbrout-testing-log.txt and ~/.local/share/jbrout/db.xml, please.
>
That has fixed the problem! Files attached as test2-jbrout-testing-log.txt
and test2-db.xml.gz.

--
Chris Green
test1-jbrout-testing-log.txt
test1-db.xml.gz
test2-db.xml.gz
test2-jbrout-testing-log.txt

Chris Green

unread,
Sep 15, 2013, 4:24:10 AM9/15/13
to jbr...@googlegroups.com
Was the above OK?

By the way my comment above saying "That has fixed the problem!" isn't
correct. It fixes the problem for the first run of jbrout where it
builds its database, but for every run after that I still get the error
I reported originally.

--
Chris Green

Matěj Cepl

unread,
Sep 15, 2013, 11:30:26 AM9/15/13
to jbr...@googlegroups.com
On 09/15/2013 10:24 AM, Chris Green wrote:
>> That has fixed the problem! Files attached as test2-jbrout-testing-log.txt
>> and test2-db.xml.gz.
>>
> Was the above OK?
>
> By the way my comment above saying "That has fixed the problem!" isn't
> correct. It fixes the problem for the first run of jbrout where it
> builds its database, but for every run after that I still get the error
> I reported originally.

OK, sorry, it is Sunday, so I have been busy with other things, but I
will take a look. Yes, it supports my working idea, that there was
something broken in your original db.xml. I will take a look and try to
make code more robust against it, or to find out why the junk gets there.

Matěj


--
http://www.ceplovi.cz/matej/, Jabber: mc...@ceplovi.cz
GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC

http://xkcd.com/743/ … enough said.

signature.asc

Chris Green

unread,
Sep 15, 2013, 2:43:01 PM9/15/13
to jbr...@googlegroups.com
On Sun, Sep 15, 2013 at 05:30:26PM +0200, Matěj Cepl wrote:
> On 09/15/2013 10:24 AM, Chris Green wrote:
> >> That has fixed the problem! Files attached as test2-jbrout-testing-log.txt
> >> and test2-db.xml.gz.
> >>
> > Was the above OK?
> >
> > By the way my comment above saying "That has fixed the problem!" isn't
> > correct. It fixes the problem for the first run of jbrout where it
> > builds its database, but for every run after that I still get the error
> > I reported originally.
>
> OK, sorry, it is Sunday, so I have been busy with other things, but I
> will take a look. Yes, it supports my working idea, that there was
> something broken in your original db.xml. I will take a look and try to
> make code more robust against it, or to find out why the junk gets there.
>
Yes, sorry, I wasn't trying to hassle you. I just wanted to check that
I had sent what you needed. :-)

-
Chris Green

Chris Green

unread,
Sep 23, 2013, 5:24:06 AM9/23/13
to jbr...@googlegroups.com
On Thu, Sep 12, 2013 at 04:59:50PM +0200, Matěj Cepl wrote:
> On 09/12/2013 03:59 PM, Chris Green wrote:
> > Ah, good, so at least it's a known bug. Do you still want me to do the
> > things you outlined in your previous posting? I can't at the moment
> > because I'm away from home, they'll have to wait until the weekend.
>
> Yes, please ... without your help I cannot move with this bug. My
> crystal ball is in the repair, and I am not able to reproduce the issue
> here, so without your help the bug will probably stay in the same state
> as before.
>
I have another symptom of what I assume is the same bug, if I hit my
"Caps Lock" key (whose function I have disabled) when the cursor is over
a thumbnail I get:-

Traceback (most recent call last):
File "/usr/lib/jbrout/jbrout.py", line 2406, in
on_window_key_press_event
key= gtk.gdk.keyval_name(b.keyval).lower()
AttributeError: 'NoneType' object has no attribute 'lower'


--
Chris Green
Reply all
Reply to author
Forward
0 new messages