libyal / libpff

Library and tools to access the Personal Folder File (PFF) and the Offline Folder File (OFF) format
GNU Lesser General Public License v3.0
289 stars 74 forks source link

Python: pst.get_root_folder() error #33

Closed taktikal17 closed 7 years ago

taktikal17 commented 7 years ago

Hi, I just install the last version: libpff-experimental-20161119 MacOS Sierra 10.12 Python2.7 & Python 3.5

I took one file fromt the Enron Database to try http://info.nuix.com/EnronDownload2013.html?mkt_tok=eyJpIjoiTXpBNE16TXdObVl4WlRFNSIsInQiOiJjNlJkVlA3ZTlwQnBGT2hNSDRvS1lFZlp0QW9VSnV4WDA3b25vaGxFcWRVVUM4STV0d2RLNjFDY0ZyeisyYVwvYjY0bWR3ZHB4aHBQUGV1VnFcLzN6OXFiM2RtNHROU1FZYnMyOTh2NjBTZzlrPSJ9

Here my code:

pst_file = "email.pst"
pst = pypff.file()
pst.open(pst_file)

print "pst:", pst   
#Output: pst: <pypff.file object at 0x1005130b0>

print "Size:", pst.get_size()  
#Output: Size: 538649600

print "root:", pst.get_root_folder() 
#Output: root: <pypff.folder object at 0x10202e850>

print "type:", pst.get_content_type()   
#Output: type: 112

print "id", pst.get_name_to_id_map() 
#Output: id <pypff.folder object at 0x10202e850>

print "orphan:", pst.get_number_of_orphan_items() 
#Output: orphan: 0

Then when I try this, I got errors:

dir = pst.get_root_folder()
print "display:", unicode(dir.get_display_name()) 
#Output: dir has not element get_display_name()
print "sub mess:", dir.get_number_of_sub_messages()
#Output: dir has not element get_number_of_sub_messages()

Is it an installation issue or something else?

Thank you!

joachimmetz commented 7 years ago

I'll have a look when time permits, Python bindings are still WIP, also see https://github.com/libyal/libpff/issues/2

taktikal17 commented 7 years ago

Hi @joachimmetz ,

Thank you for your answer. Do you think you can provide me with a previous version to see if the error is related to this last version?

Thank you