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

[Bug]: Gwy file not loading #832

Closed
7 tasks done
SylviaWhittle opened this issue Apr 30, 2024 · 1 comment · Fixed by #837
Closed
7 tasks done

[Bug]: Gwy file not loading #832

SylviaWhittle opened this issue Apr 30, 2024 · 1 comment · Fixed by #837
Assignees
Labels
bug Something isn't working

Comments

@SylviaWhittle
Copy link
Collaborator

Checklist

  • Re-run analysis with topostats process --core 1.
  • Describe the bug.
  • Include the configuration file.
  • Copy of the output.
  • The exact command that failed. This is what you typed at the command line, including any options.
  • TopoStats version, this is reported by topostats --version
  • Operating System and Python Version

Describe the bug

Some .gwy files fail to load.

Copy of the output

image

Include the configuration file

Default config with .gwy selected.

To Reproduce

Run TopoStats on this file: https://drive.google.com/file/d/1CWQnVYJg0UXuJLqZ4xWYbnjDM5v2u5N-/view?usp=share_link. Not to be shared outside the University.

TopoStats Version

Git main branch

Python Version

3.11

Operating System

MacOS M1/M2 (post-2021)

Python Packages

N/A

@SylviaWhittle SylviaWhittle added the bug Something isn't working label Apr 30, 2024
@SylviaWhittle
Copy link
Collaborator Author

I believe I have found the root cause and a solution.

The crash is caused by the byte 0xb5 (the micro symbol) not being able to be read by read_null_terminated_string. This is due to said byte not being in the utf-8 encoding that is default for the function. I resolved this by using the latin1 encoding which is able to handle said character.

I think the fix should try utf-8 as it supports more characters than latin1, but to try latin1 after a failed read of utf-8. Branch & commit to follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant