sirebellum / qgis-segmentation

QGIS plugin to facilitate map segmentation.
http://www.quantcivil.ai/map-segmenter
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

Cannot run the plugins after install #20

Open GuyGeneau opened 1 week ago

GuyGeneau commented 1 week ago

Hi,

here are the steps I've done on QGIS with these specs :

Version de QGIS 3.34.9-Prizren Révision du code cbbc7bdf Version de Qt 5.15.13 Version de Python 3.12.4 Version de GDAL/OGR 3.9.1 Version de Proj 9.4.0 Version de la base de données du registre EPSG v11.004 (2024-02-24) Version de GEOS 3.12.2-CAPI-1.18.2 Version de SQLite 3.45.1 Version de PDAL 2.6.3 Version du client PostgreSQL 16.2 Version de SpatiaLite 5.1.0 Version de QWT 6.2.0 Version de QScintilla2 2.14.1 Version de l'OS Windows 10 Version 2009

1- cannot run the plugins from the Plugins installer of QGIS because of a "Nonetype write attributs" 2- install the python packages from the python console in QGIS 3- cannot run the plugins because "torch" is not install??? it is install (see below)! Do I have to upgrade pip install? Is there anything I'm missing?

import pip pip.main(["install", "scikit-learn"]) WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Collecting scikit-learn Downloading scikit_learn-1.5.2-cp312-cp312-win_amd64.whl.metadata (13 kB) Requirement already satisfied: numpy>=1.19.5 in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from scikit-learn) (1.26.4) Requirement already satisfied: scipy>=1.6.0 in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from scikit-learn) (1.13.0) Collecting joblib>=1.2.0 (from scikit-learn) Downloading joblib-1.4.2-py3-none-any.whl.metadata (5.4 kB) Collecting threadpoolctl>=3.1.0 (from scikit-learn) Downloading threadpoolctl-3.5.0-py3-none-any.whl.metadata (13 kB) Downloading scikit_learn-1.5.2-cp312-cp312-win_amd64.whl (11.0 MB) ---------------------------------------- 11.0/11.0 MB 16.4 MB/s eta 0:00:00 Downloading joblib-1.4.2-py3-none-any.whl (301 kB) --------------------------------------- 301.8/301.8 kB 18.2 MB/s eta 0:00:00 Downloading threadpoolctl-3.5.0-py3-none-any.whl (18 kB) Installing collected packages: threadpoolctl, joblib, scikit-learn Successfully installed joblib-1.4.2 scikit-learn-1.5.2 threadpoolctl-3.5.0

[notice] A new release of pip is available: 24.0 -> 24.2 [notice] To update, run: qgis-ltr-bin.exe -m pip install --upgrade pip 0 pip.main(["install", "torch", "--index-url", "https://download.pytorch.org/whl/cu121"]) WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://download.pytorch.org/whl/cu121 Collecting torch Downloading https://download.pytorch.org/whl/cu121/torch-2.4.1%2Bcu121-cp312-cp312-win_amd64.whl (2444.8 MB) ---------------------------------------- 2.4/2.4 GB 1.9 MB/s eta 0:00:00 Collecting filelock (from torch) Downloading https://download.pytorch.org/whl/filelock-3.13.1-py3-none-any.whl (11 kB) Collecting typing-extensions>=4.8.0 (from torch) Downloading https://download.pytorch.org/whl/typing_extensions-4.9.0-py3-none-any.whl (32 kB) Collecting sympy (from torch) Downloading https://download.pytorch.org/whl/sympy-1.12-py3-none-any.whl (5.7 MB) ---------------------------------------- 5.7/5.7 MB 26.2 MB/s eta 0:00:00 Requirement already satisfied: networkx in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from torch) (3.3) Requirement already satisfied: jinja2 in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from torch) (3.1.3) Collecting fsspec (from torch) Downloading https://download.pytorch.org/whl/fsspec-2024.2.0-py3-none-any.whl (170 kB) ------------------------------------- 170.9/170.9 kB 10.0 MB/s eta 0:00:00 Requirement already satisfied: setuptools in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from torch) (69.2.0) Requirement already satisfied: MarkupSafe>=2.0 in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from jinja2->torch) (2.1.5) Collecting mpmath>=0.19 (from sympy->torch) Downloading https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 kB) ------------------------------------- 536.2/536.2 kB 32.9 MB/s eta 0:00:00 Installing collected packages: mpmath, typing-extensions, sympy, fsspec, filelock, torch WARNING: The script isympy.exe is installed in 'C:\Users\Guy\AppData\Roaming\Python\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts convert-caffe2-to-onnx.exe, convert-onnx-to-caffe2.exe and torchrun.exe are installed in 'C:\Users\Guy\AppData\Roaming\Python\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed filelock-3.13.1 fsspec-2024.2.0 mpmath-1.3.0 sympy-1.12 torch-2.4.1+cu121 typing-extensions-4.9.0

[notice] A new release of pip is available: 24.0 -> 24.2 [notice] To update, run: qgis-ltr-bin.exe -m pip install --upgrade pip 0 WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Looking in indexes: https://download.pytorch.org/whl/cu121 Collecting torch Using cached https://download.pytorch.org/whl/cu121/torch-2.4.1%2Bcu121-cp312-cp312-win_amd64.whl (2444.8 MB) Collecting filelock (from torch) Using cached https://download.pytorch.org/whl/filelock-3.13.1-py3-none-any.whl (11 kB) Collecting typing-extensions>=4.8.0 (from torch) Using cached https://download.pytorch.org/whl/typing_extensions-4.9.0-py3-none-any.whl (32 kB) Collecting sympy (from torch) Using cached https://download.pytorch.org/whl/sympy-1.12-py3-none-any.whl (5.7 MB) Requirement already satisfied: networkx in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from torch) (3.3) Requirement already satisfied: jinja2 in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from torch) (3.1.3) Collecting fsspec (from torch) Using cached https://download.pytorch.org/whl/fsspec-2024.2.0-py3-none-any.whl (170 kB) Requirement already satisfied: setuptools in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from torch) (69.2.0) Requirement already satisfied: MarkupSafe>=2.0 in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from jinja2->torch) (2.1.5) Collecting mpmath>=0.19 (from sympy->torch) Using cached https://download.pytorch.org/whl/mpmath-1.3.0-py3-none-any.whl (536 kB) Installing collected packages: mpmath, typing-extensions, sympy, fsspec, filelock, torch WARNING: The script isympy.exe is installed in 'C:\Users\Guy\AppData\Roaming\Python\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts convert-caffe2-to-onnx.exe, convert-onnx-to-caffe2.exe and torchrun.exe are installed in 'C:\Users\Guy\AppData\Roaming\Python\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed filelock-3.13.1 fsspec-2024.2.0 mpmath-1.3.0 sympy-1.12 torch-2.4.1+cu121 typing-extensions-4.9.0

[notice] A new release of pip is available: 24.0 -> 24.2 [notice] To update, run: qgis-ltr-bin.exe -m pip install --upgrade pip WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip. Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue. To avoid this problem you can invoke Python with '-m pip' instead of running pip directly. Defaulting to user installation because normal site-packages is not writeable Collecting scikit-learn Using cached scikit_learn-1.5.2-cp312-cp312-win_amd64.whl.metadata (13 kB) Requirement already satisfied: numpy>=1.19.5 in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from scikit-learn) (1.26.4) Requirement already satisfied: scipy>=1.6.0 in c:\progra~1\qgis33~1.9\apps\python312\lib\site-packages (from scikit-learn) (1.13.0) Collecting joblib>=1.2.0 (from scikit-learn) Using cached joblib-1.4.2-py3-none-any.whl.metadata (5.4 kB) Collecting threadpoolctl>=3.1.0 (from scikit-learn) Using cached threadpoolctl-3.5.0-py3-none-any.whl.metadata (13 kB) Using cached scikit_learn-1.5.2-cp312-cp312-win_amd64.whl (11.0 MB) Using cached joblib-1.4.2-py3-none-any.whl (301 kB) Using cached threadpoolctl-3.5.0-py3-none-any.whl (18 kB) Installing collected packages: threadpoolctl, joblib, scikit-learn Successfully installed joblib-1.4.2 scikit-learn-1.5.2 threadpoolctl-3.5.0

[notice] A new release of pip is available: 24.0 -> 24.2 [notice] To update, run: qgis-ltr-bin.exe -m pip install --upgrade pip

Thanks for your help.

sirebellum commented 4 days ago

Hi there and thanks for opening an issue! Let's try to get to the bottom of this.

I don't see any specific error in the logs you posted. Am I missing something or what is the specific error that the plugin throws at load/runtime?

GuyGeneau commented 1 day ago

Hi,

I reload the plugin today and everything is working fine. I really don't know what happened because I didn't change anything in the weekend. Sorry for bothering you.