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

pypff: IOError for get_number_of_recovered_items() #16

Closed wang178743010 closed 7 years ago

wang178743010 commented 8 years ago

I compile this file into the python libraries, import, but the import into, after open the PST files. But will not be able to use internal methods of the library. Don't know what's going on.

joachimmetz commented 8 years ago

You'll have to be more specific:

wang178743010 commented 8 years ago

error info:Traceback (most recent call last): File "/home/wshu/workspace/file_list/pst_filelist.py", line 16, in number_of_items = pst_file.get_number_of_recovered_items() IOError: pypff_file_get_number_of_recovered_items: unable to retrieve number of recover items. libcdata_list_get_number_of_elements: invalid list. libpff_file_get_number_of_recovered_items: unable to retrieve number of recovered items. My Code : filepst_object = open("/home/wshu/pst/duythanh.pst", mode='rb') pst_file = pypff.file() pst_file.open_file_object(filepst_object) print "pst_file:>",type(pst_file) nnumber_of_items = pst_file.get_size() number_of_items = pst_file.get_number_of_recovered_items() number_of_items = pst_file.number_of_items pst_item = pst_file.get_item(0) print number_of_items

wang178743010 commented 8 years ago
nnumber_of_items = pst_file.get_number_of_recovered_items()

IOError: pypff_file_get_number_of_recovered_items: unable to retrieve number of recover items. libcdata_list_get_number_of_elements: invalid list. libpff_file_get_number_of_recovered_items: unable to retrieve number of recovered items.

joachimmetz commented 8 years ago

I'll have a look when time permits, could be something that needs work.

Know that the Python bindings are still work in progress as indicated in https://github.com/libyal/libpff/issues/2

joachimmetz commented 7 years ago

will be part of work on Python bindings