Bug in etmtk 3.2.38 - Timers not being reloaded

10 views
Skip to first unread message

Jon Wilks

unread,
May 12, 2019, 12:01:24 PM5/12/19
to Event and Task Manager
Dan

There is an issue with etmtk where existing timers are not being loaded.  Looking at the source on GitHub, there seems to be an issue in the loadTimers() method in dialog.py where the yaml.safe_load() function is not loading the previously saved timers.  If I take loadTimers() out of the try: section I get;

    ruamel.yaml.constructor.ConstructorError: could not determine a constructor for the tag 'tag:yaml.org,2002:python/tuple'

Changing the yaml.safe_load to yaml.load gives us behavour that matches the manual but gives us warnings about not using safe_load.

Any ideas??


Daniel Graham

unread,
May 12, 2019, 5:59:54 PM5/12/19
to eventandt...@googlegroups.com
What version of PyYaml (actually ruamel.yaml) is displayed when you press F2? Mine is 0.15.94. Please let me know if you update ruamel.yaml and if it helps.

— Dan





--
You received this message because you are subscribed to the Google Groups "Event and Task Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eventandtaskman...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eventandtaskmanager/a4e01369-ee0c-4c7c-bd19-f17ce47e4f18%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jon Wilks

unread,
May 13, 2019, 3:26:22 AM5/13/19
to eventandt...@googlegroups.com
Hi Dan,

Here is what I get when I press F2.

System Information:
  Platform:   Darwin-18.5.0
  Python:     3.7.3
  Dateutil:   2.8.0
  PyYaml:     0.15.94
  Tk/Tcl
     Version: 8.5.9
     Style:   aqua
  Encodings
     File:    cp1252
     GUI:     cp1252
     Term:    cp1252

When I get a moment I will investigate further.

Jon

You received this message because you are subscribed to a topic in the Google Groups "Event and Task Manager" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/eventandtaskmanager/0wHbd2hR1xg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to eventandtaskman...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/eventandtaskmanager/0A78ADA5-9BC7-4AEF-B889-F3F973D83539%40gmail.com.

For more options, visit https://groups.google.com/d/optout.


--
Jon Wilks
(V) 01489 786612
(M) 07714 517502
(A) 87 Missenden Acres, Hedge End, Hampshire, SO30 2RD

Dan

unread,
May 13, 2019, 9:36:04 AM5/13/19
to Event and Task Manager
Jon,

The API for ramel.yaml changed with version 0.15. You might try the following. 

Around line 14 in dialog.py, replace

import ruamel.yaml as yaml

with 
from ruamel.yaml import YAML
yaml = YAML(typ='unsafe')

Then around line 1180 in loadTimers(), replace

tmp =  yaml.safe_load(fo)

with 
tmp = yaml(fo)

Please let me know if this helps.

-- Dan 
 

Jon Wilks

unread,
May 13, 2019, 1:55:10 PM5/13/19
to Event and Task Manager
Dan,

Almost!  On line 1180 I replaced your suggestion of

    tmp = yaml(fo)

with

   tmp = yaml.load(fo)

Thanks for your time.
Reply all
Reply to author
Forward
0 new messages