pyOneNote icon indicating copy to clipboard operation
pyOneNote copied to clipboard

Found 2 mistakes that cause incorrect properties output

Open pplee2020 opened this issue 1 year ago • 1 comments

1.in FileNode.py:line581 class ObjectSpaceObjectStreamOfIDs: def init(self, file, document): self.header = ObjectSpaceObjectStreamHeader(file) self.body = [] self.head = 0 for i in range(self.header.Count): self.body.append(CompactID(file, document))

def read(self):
    res = None
    if self.head < len(self.body):
        res = self.body[self.head]
        self.head += 1#Miss this line
    return res

def reset(self):
    self.head = 0

2.in FileNode.py:line695 elif 'languageid' in property_name_lower: lcid, =struct.unpack('<I', self.rgData[i]) propertyVal = '{}({})'.format(PropertySet.lcid_to_string(lcid), lcid) else: if isinstance(self.rgData[i], list): #propertyVal = [str(i) for i in self.rgData[i]] propertyVal = [str(j) for j in self.rgData[i]] #i -> j else: propertyVal = str(self.rgData[i]) self._formated_properties[propertyName] = propertyVal return self._formated_properties

pplee2020 avatar May 15 '24 07:05 pplee2020

Thank you @pplee2020, I started working with this module this evening and was banging my head against the wall trying to figure out why the property GUIDs were repeating/duplicated. This fixed it.

ToniWestbrook avatar Oct 14 '25 06:10 ToniWestbrook