TagLab load order issue on Windows#212
Open
eth42 wants to merge 1 commit intocnr-isti-vclab:mainfrom
Open
Conversation
Added an early import of rasterio in the main script to fix a load order related issue on WIndows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
The installation process of TagLab worked just fine on a Win11 setup with msys2 and gnu compiler suite inside a virtualenv, which thankfully allowed to use the pip installs for rasterio and gdal in the absence of msvc tools. However, when starting TagLab, the process quietly dies on the rasterio import in
QtAlignmentToolWidget.py. After fiddling around, I noticed that the rasterio import works just fine, when run in REPL or inside a minimal test script. I guess it has something to do with the load order of libraries, though I cannot pinpoint the issue any further. What fixed it for me is to addimport rasterio as _rio(unused import) to the top ofTagLab.py. My suggestion is to just add that line, to fix any load order issues with rasterio, as it is going to be imported anyhow and doing it earlier does not hurt, does it?Best
Erik
PS: For some reason, the diff includes addition and deletion of the line
sys.exit(app.exec_()). I don't know if that's a bug in the diff, but the result is of course identical.