Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3 bug fixes #179

Merged
merged 3 commits into from Sep 5, 2014
Merged

3 bug fixes #179

merged 3 commits into from Sep 5, 2014

Conversation

gkarsay
Copy link
Contributor

@gkarsay gkarsay commented Sep 5, 2014

I got sometimes a crash but couldn't say when exactly. The backtrace was:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/hamster/overview.py", line 472, in on_facts_changed
self.find_facts()
File "/usr/lib/python2.7/dist-packages/hamster/overview.py", line 451, in find_facts
self.fact_tree.set_facts(self.facts)
File "/usr/lib/python2.7/dist-packages/hamster/widgets/facttree.py", line 389, in set_facts
self.set_row_heights()
File "/usr/lib/python2.7/dist-packages/hamster/widgets/facttree.py", line 445, in set_row_heights
self.vadjustment.set_lower(0)
AttributeError: 'NoneType' object has no attribute 'set_lower'

After fixing this I got this one instead:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/hamster/overview.py", line 472, in on_facts_changed
self.find_facts()
File "/usr/lib/python2.7/dist-packages/hamster/overview.py", line 451, in find_facts
self.fact_tree.set_facts(self.facts)
File "/usr/lib/python2.7/dist-packages/hamster/widgets/facttree.py", line 395, in set_facts
self.set_current_fact(fact_ids.index(current_fact.id))
File "/usr/lib/python2.7/dist-packages/hamster/widgets/facttree.py", line 308, in set_current_fact
self.on_scroll()
File "/usr/lib/python2.7/dist-packages/hamster/widgets/facttree.py", line 471, in on_scroll
y_pos = max(0, min(self.vadjustment.get_upper() - self.height, y_pos))
AttributeError: 'NoneType' object has no attribute 'get_upper'

I don't know the deeper cause for this so there might be a better solution than mine.

I got also a crash in Overview when looking in my locale (German) the months March (März) and January (Jänner). The backtrace is:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/hamster/overview.py", line 106, in on_time_forth_click
self.range_pick.next_range()
File "/usr/lib/python2.7/dist-packages/hamster/widgets/dates.py", line 133, in next_range
self.emit_range(self.current_range, start, end)
File "/usr/lib/python2.7/dist-packages/hamster/widgets/dates.py", line 92, in emit_range
self.set_range(start, end)
File "/usr/lib/python2.7/dist-packages/hamster/widgets/dates.py", line 86, in set_range
self.label.set_markup('%s' % stuff.format_range(start_date, end_date).encode("utf-8"))
File "/usr/lib/python2.7/dist-packages/hamster/lib/stuff.py", line 97, in format_range
title = (u"%(start_B)s %(start_d)s – %(end_d)s, %(end_Y)s") % dates_dict
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 1: ordinal not in range(128)

And the description of facts was wrong when it had an & in it. It would show a completely different description from some other fact.

@toupeira
Copy link
Contributor

toupeira commented Sep 5, 2014

Thanks! Looks good to me, I think I'll just merge these...

toupeira added a commit that referenced this pull request Sep 5, 2014
@toupeira toupeira merged commit 4b9bc97 into projecthamster:master Sep 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants