shred86/Ortho4XP

Bug: gdal is not working on packaged version

Closed this issue · 5 comments

gdal isn't currently working on the packaged version of Ortho4Xp so trying to use custom_dem like NED 1" will not work.

Update: fixed for Windows, but not macOS. I have a feeling it has something to do with the fact on macOS you need to brew install gdal and also install gdal within the venv.

Not having luck on macOS. GDAL is definitely being included as a part of the build as I can see the library in the _internal folder. I've tried a numbering of things but still the same issue.

  1. Setting up all my dependencies outside of a venv and building there.
  2. Tried using hidden-imports flag with pyinstaller, even thought I know it's being pulled in.
  3. Tried manually setting the paths flag to both my homebrew python libraries and venv.

Fixed it. I have no idea why, but after running pyinstaller, I had to then copy the *.so files from my venv site-packages, /Users/user_name/Projects/Ortho4XP/venv/lib/python3.12/site-packages/osgeo and replace the ones in _internal/osgeo. It makes absolutely no sense because I can see during the pyinstaller process it's loading the module hook from the same location:

6136 INFO: Loading module hook 'hook-osgeo.py' from '/Users/user_name/Projects/Ortho4XP/venv/lib/python3.12/site-packages/_pyinstaller_hooks_contrib/hooks/stdhooks'...

What's interesting is the file size of the *.so in my venv site-packages and the _internal folder were all slightly different.

w8sl commented

That worked, thanks!

O4_Imagery_Utils.py: small correction

O4_Imagery_Utils

Good catch! I'm an idiot. Just pushed a fix into dev and merged into master.

w8sl commented

No, I was just testing GDAL. It works perfectly on 3 systems now!