Browse Source

Fix for Windows

tags/1.6.1
John Daily 5 years ago
parent
commit
f54308cf04
1 changed files with 5 additions and 7 deletions
  1. 5
    7
      akvo/gui/akvoGUI.py

+ 5
- 7
akvo/gui/akvoGUI.py View File

@@ -82,7 +82,7 @@ class AkvoYamlNode(yaml.YAMLObject):
82 82
     #    self.Import = OrderedDict( node["Import"] ) # {}
83 83
     #    self.Processing = OrderedDict( node["Processing"] ) 
84 84
     def __repr__(self):
85
-        return "%s(name=%r, Akvo_VESION=%r, Import=%r, Processing=%r)" % (
85
+        return "%s(name=%r, Akvo_VERSION=%r, Import=%r, Processing=%r)" % (
86 86
             #self.__class__.__name__, self.Akvo_VERSION, self.Import, self.Processing )
87 87
             self.__class__.__name__, self.Akvo_VERSION, self.Import, OrderedDict(self.Processing) ) 
88 88
             #self.__class__.__name__, self.Akvo_VERSION, self.Import, OrderedDict(self.Processing)) 
@@ -760,12 +760,10 @@ class ApplicationWindow(QtWidgets.QMainWindow):
760 760
         self.logText = self.RAWDataProc.DATADICT["INFO"]["log"] # YAML 
761 761
 
762 762
         self.YamlNode = AkvoYamlNode( )  #self.logText )
763
-        self.YamlNode.Akvo_VERSION = (yaml.load( self.logText )).Akvo_VERSION
764
-        self.YamlNode.Import = OrderedDict((yaml.load( self.logText )).Import)
765
-        self.YamlNode.Processing = OrderedDict((yaml.load( self.logText )).Processing)
766
-        #self.YamlNode.Akvo_VERSION =  2 #yaml.load( self.logText )["Akvo_VERSION"] #, Loader=yaml.RoundTripLoader) # offending line! 
767
-        #self.YamlNode = AkvoYamlNode( self.logText ) # offending line! 
768
-        #print("import type", type( self.YamlNode.Processing ))
763
+       
764
+        self.YamlNode.Akvo_VERSION = (yaml.load( self.logText, Loader=yaml.Loader )).Akvo_VERSION
765
+        self.YamlNode.Import = OrderedDict((yaml.load( self.logText, Loader=yaml.Loader )).Import)
766
+        self.YamlNode.Processing = OrderedDict((yaml.load( self.logText, Loader=yaml.Loader )).Processing)
769 767
         self.Log() 
770 768
             #self.ui.logTextBrowser.append( yaml.dump(self.YamlNode)) #, default_flow_style=False)  )
771 769
         #except KeyError:

Loading…
Cancel
Save