GTG

gtg-0.3-2.fc18: dates.py:115:_parse_init_value:ValueError: Unknown value for date: 'straks'

Bug #1109011 reported by Reinout van Schouwen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GTG
Won't Fix
High
Izidor Matušov

Bug Description

From https://bugzilla.redhat.com/show_bug.cgi?id=903759

Version-Release number of selected component:
gtg-0.3-2.fc18

Additional info:
cmdline: /usr/bin/python /usr/bin/gtg
executable: /usr/bin/gtg
kernel: 3.7.2-204.fc18.x86_64
uid: 500

Truncated backtrace:
dates.py:115:_parse_init_value:ValueError: Unknown value for date: 'straks'

Traceback (most recent call last):
  File "/usr/bin/gtg", line 85, in <module>
    main()
  File "/usr/bin/gtg", line 81, in main
    sys.exit(gtg.main(options, args))
  File "/usr/lib/python2.7/site-packages/GTG/gtg.py", line 118, in main
    ds, req = core_main_init(options, args)
  File "/usr/lib/python2.7/site-packages/GTG/gtg.py", line 150, in core_main_init
    ds.register_backend(backend_dic)
  File "/usr/lib/python2.7/site-packages/GTG/core/datastore.py", line 427, in register_backend
    source.start_get_tasks()
  File "/usr/lib/python2.7/site-packages/GTG/core/datastore.py", line 650, in start_get_tasks
    self.backend.start_get_tasks()
  File "/usr/lib/python2.7/site-packages/GTG/backends/backend_localfile.py", line 145, in start_get_tasks
    task = taskxml.task_from_xml(task, node)
  File "/usr/lib/python2.7/site-packages/GTG/tools/taskxml.py", line 55, in task_from_xml
    duedate = Date(read_node(xmlnode, "duedate"))
  File "/usr/lib/python2.7/site-packages/GTG/tools/dates.py", line 93, in __init__
    self._parse_init_value(value)
  File "/usr/lib/python2.7/site-packages/GTG/tools/dates.py", line 115, in _parse_init_value
    raise ValueError("Unknown value for date: '%s'" % value)
ValueError: Unknown value for date: 'straks'

Local variables in innermost frame:

Tags: github
Revision history for this message
Lionel Dricot (ploum-deactivatedaccount) wrote :

Izidor, any idea on how to solve that ?

Changed in gtg:
assignee: nobody → Izidor Matušov (izidor)
Revision history for this message
Izidor Matušov (izidor) wrote :

As Lionel suggested, this traceback users should not see... I would suggest this: for unknown value, change it to NoDate and show error in GTG logs.

Reinout> so far, you can open your task's XML file and replace "starks" by English term (now/soon/later/someday) If you agree, I would like to investigate what could go wrong and how to fix it properly but I need your help: Did you change locale's of your computer recently? Migrated from older GTG? What locale do you use?

Changed in gtg:
milestone: none → 0.3.1
importance: Undecided → High
status: New → Confirmed
status: Confirmed → Incomplete
Revision history for this message
Reinout van Schouwen (reinouts) wrote :

No I didn't change my locale recently, I am using nl_NL and I did upgrade from F17 to F18.

Here's a snippet from my tasks xml file that shows 'straks' (later):

        <task id="51@1" status="Done" tags="" uuid="9e7dff27-291a-4789-9463-95a5dd684eb2">
                <title>
                        Uitnodiging woensdagmiddag
                </title>
                <duedate>
                        straks
                </duedate>
                <modified>
                        2011-03-15T17:24:51
                </modified>
                <donedate>
                        2011-03-15
                </donedate>
        </task>

Revision history for this message
Reinout van Schouwen (reinouts) wrote :

Replacing the 'straks' occurence in the xml file solved the problem for me.

Revision history for this message
Izidor Matušov (izidor) wrote :

As it is hard to reproduce it, I would suggest to fix it by better handling error suggested in Comment #2.

Changed in gtg:
milestone: 0.3.1 → 0.4
Izidor Matušov (izidor)
tags: added: github
Jeff Fortin Tam (kiddo)
Changed in gtg:
status: Incomplete → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.