Reading/writing block files

Skip to first unread message

Ankush Kashiwar

Aug 6, 2018, 11:12:15 AM8/6/18
to hyperspy-users
Dear All

I am trying to extract individual images (diffraction signals) from scanning precession electron diffraction block file using following commands: 

However, I have not been able to execute these commands, I am getting an error message:

AttributeError: module 'hyperspy' has no attribute 'io_plugins'

Nevertheless, 'io_plugins' package  with the script '' is stored under following address: 


Could you please suggest a potential solution to this problem?

Thank you.

Best Regards

Ankush Kashiwar

Josh Taillon

Aug 6, 2018, 11:59:44 AM8/6/18
Hi Ankush,

This sounds like a problem either with your installation, or how you're trying to access the file.

We typically recommend using hyperspy through the api, by running the statement

import hyperspy.api as hs

Then you would load the file using:


It should automatically detect the filetype from the extension and use the right reader. If you are trying to use hyperspy more low-level as a library, you would have to import the correct module directly:

from hyperspy.io_plugins import blockfile

Hopefully that helps.

- Josh
You received this message because you are subscribed to the Google Groups "hyperspy-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
For more options, visit

Joshua Taillon
Reply all
Reply to author
0 new messages