marksgraham / OCT-Converter

Tools for extracting the raw optical coherence tomography (OCT) and fundus data from proprietary file formats.
https://pypi.org/project/oct-converter/
MIT License
199 stars 70 forks source link

'ascii' codec can't decode byte 0xff in position 8: ordinal not in range(128) #98

Closed benjaminralex closed 1 year ago

benjaminralex commented 1 year ago

Upon trying to open an E2E file, I get the following error:

'ascii' codec can't decode byte 0xff in position 8: ordinal not in range(128)

What is the most likely cause of this? Thanks!

marksgraham commented 1 year ago

Hi,

Haven't come across this .e2e error before and it suggests its having trouble early on, reading the main directory structure. One thing you could try is to read it using eyepy which has a different .e2e reader and may fare better. Alternatively, if you're able to share the file with my I could have a look.

marksgraham commented 1 year ago

Hi @benjaminralex

Did you solve this? I've come across this elsewhere and I think I may have found a fix, let me know if you want to test it out.

benjaminralex commented 1 year ago

Hi Mark, I have not unfortunately.

Thank you for the follow up. Would greatly appreciate a fix!

Thank you!

marksgraham commented 1 year ago

Could you try out the update on the main branch

Using pip install git+https://github.com/marksgraham/OCT-Converter

benjaminralex commented 1 year ago

That seems to do the trick! I tested on a few images, but it maybe fail on a wider set of samples. Thanks a lot! Much appreciated.