twVolc / PyCamPermanent

Permanent PiCam (SO2) installation project software
GNU General Public License v3.0
2 stars 2 forks source link

Compatibility issue with shapely=2.0.1 #22

Closed twVolc closed 1 year ago

twVolc commented 1 year ago

Using the latest version of shapely leads to a KeyError when trying to use IFitWorker.ld_lookup. It seems to be associated with shapely.STRTree.query().

Screenshot 2023-05-26 10 33 38

Error can be recreated by:

  1. Running GUI
  2. Navigate to View>More windows>Light Dilution settings
  3. Select the Spectrometer tab
  4. Check 'Use spectrometer light dilution correction' box
  5. Close window
  6. Select Processing>Post-Processing>Process DOAS

The first spectrum will be processed, then the error will be thrown in the terminal.

I've not tested on this specific dataset, but on another reverting back to shapely=1.7.1 fixed the issue and light dilution correction was correctly performed.

This is related to the Pull Request https://github.com/twVolc/PyCamPermanent/pull/11

ubdbra001 commented 1 year ago

This may come in useful if we need to make changes to the code to accomodate version 2.0+: Migrating to Shapely 1.8 / 2.0

ubdbra001 commented 1 year ago

Looks like the index_by_id dict has different values for the shapley 1.7.1 vs 2.0.1. Not sure why this would be as this variable (as far as I can tell) isn't generated by shapley

ubdbra001 commented 1 year ago

Version 1.8.5 may provide a good intermediate between 1.7.1 (which is missing a .dll when pip installed) and 2.0.1 (which changes the API and so no longer works in PyCam). No missing dll, and no error when doing doas processing.