Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.