SMByC / CCD-Plugin

The CCD-Plugin uses Google Earth Engine to get Landsat or Sentinel2 datasets and run the Continuous Change Detection (CCDC) algorithm to analyze the trends and breakpoints of change over multi-year time series at a given coordinate.
GNU General Public License v3.0
37 stars 4 forks source link

'Figure' object has no attribute 'add_vline' #7

Closed philippgaertner closed 11 months ago

philippgaertner commented 11 months ago

Plot could not be created due to the following error.

Traceback (most recent call last): File "/Users/philippgaertner/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/CCD_Plugin/utils/system_utils.py", line 35, in wrapper return func(*args, *kwargs) File "/Users/philippgaertner/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/CCD_Plugin/utils/system_utils.py", line 91, in wrapper obj_returned = func(args, kwargs) File "/Users/philippgaertner/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/CCD_Plugin/gui/CCD_Plugin_dockwidget.py", line 170, in new_plot self.html_file = generate_plot(ccdc_result_info, timeseries, date_range, dataset, band_or_index, CCD_Plugin.tmp_dir) File "/Users/philippgaertner/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/CCD_Plugin/core/plot.py", line 120, in generate_plot fig.add_vline(x=break_date, line_width=1, line_dash="dash", line_color="red", AttributeError: 'Figure' object has no attribute 'add_vline'**

MacBook Pro Apple M1 QGIS Version: 3.28.2-Firenze Qt version: 5.15.2 Python version: 3.9.5 CCD Plugin: 23.7 ee_plugin: 0.0.6

XavierCLL commented 11 months ago

Hi @philippgaertner

The plugin needs a function in the plotly library that is present in > 4.12, please run this in the Qgis console:

import plotly
print(plotly.__version__)

I recommend you update to the latest Qgis LTR 3.28.9, I am almost sure that updating Qgis fix this issue.

Regards Xavier

XavierCLL commented 11 months ago

thanks for reporting it, but I close this due to inactivity, feel free to open it again