Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad file signature while reading E57 written with pye57 #47

Open
rajagopalps opened this issue Dec 12, 2023 · 1 comment
Open

Bad file signature while reading E57 written with pye57 #47

rajagopalps opened this issue Dec 12, 2023 · 1 comment
Labels
question Further information is requested

Comments

@rajagopalps
Copy link

rajagopalps commented Dec 12, 2023

I am writing an E57 file using pye57.write_scan_raw() and I can load this e57 file in BIM Collab and Cloud Compare.

If i try to read back the same e57 file, there is an error about the file signature not being ASTM-E57.

e57_write = pye57.E57("sample.e57", mode='w')
e57_write.write_scan_raw(data_sample,  translation=scan_0_tra ) # I can load the this E57 file in BIM Collab and Cloud Compare

# read back written e57
e57new = pye57.E57("sample.e57", mode='r')

This last line throws an error. The error messages are:

e57new = pye57.E57("sample.e57", mode="r")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\ProgramData\anaconda3\envs\vtk1\Lib\site-packages\pye57\e57.py", line 66, in init
raise e
File "C:\ProgramData\anaconda3\envs\vtk1\Lib\site-packages\pye57\e57.py", line 57, in init
self.image_file = libe57.ImageFile(path, mode)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pye57.libe57.E57Exception: file signature not ASTM-E57 (E57_ERROR_BAD_FILE_SIGNATURE)

Is there something I am not passing to write_scan_raw or not passing while calling pye57.E57 to read the written file?.

Thanks
Rajagopal

@dancergraham
Copy link
Collaborator

Hello,
Can you provide any more data about what went wrong? Have you had a look at the test_main.py file for an example of file writing?

@dancergraham dancergraham added the question Further information is requested label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants