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

Not abel to load file paths with symlinks #19

Open
dickscheid opened this issue Sep 7, 2020 · 1 comment
Open

Not abel to load file paths with symlinks #19

dickscheid opened this issue Sep 7, 2020 · 1 comment
Assignees

Comments

@dickscheid
Copy link
Contributor

Pytiff gives an OSError: file not found when opening a new image with pytiff.Tiff('filename.tif') in case that the filename path is a symlink. I could overcome this problem by doing from os import readlink; pytiff.Tiff(readlink('filename.tif')); however this is not the expected behaviour.

@dickscheid
Copy link
Contributor Author

dickscheid commented Sep 7, 2020

In fact the os.readlink command mentioned above will fail if the filename is not a link. The safer solution is os.path.realpath. Using this by default inside pytiff might be a safe solution, but I am not sure wether it is platform independent (tested only on the Jülich JUDAC linux system).

@dickscheid dickscheid assigned dickscheid and mhuysegoms and unassigned dickscheid Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants