-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
no attribute 'collections' when using Iso Area As Polygons From Point or Layer #71
Comments
Thank you for reporting this issue. The change in the Matplotlib API could in deed be the cause of this issue. |
Thank you for the swift response Clemens. Do you think this is something that will be fixed or is the plugin dormant? |
I guess it has to be fixed. Unfortunately I am very busy at the moment, but due to the fact that it is breaking the plugin, I would like to look into the issue later. Thank you for the link to the deprecation info. |
Fixed with this commit. @marteinnm can you test the fix with the current version of the repo? If it works for you too, I will publish it in the qgis plugin manager. |
Bear with me, I'm not very proficient in the Github world. I tried downloading the ZIP as shown in the figure. When I install the plugin from the ZIP I get the following error: Couldn't load plugin 'QNEAT3-master' due to an error when calling its classFactory() method ModuleNotFoundError: No module named 'QNEAT3' Python version: 3.12.8 (main, Dec 20 2024, 15:21:15) [MSC v.1938 64 bit (AMD64)] Python Path: |
Ok sorry for the spam and closing and reopining, that was a mistake. After copy-pasting the QNEAT3Framework.py code into my local script and restarting Qgis the plugin works fine again. Thanks for the swift response! I'll let you close the issue. |
Hi, I have the same problem but I'm not that good at solving problems like this and I didn't quite understand how you solved it. Can you please tell me in more detail what to do? |
I am definitely no expert in this realm so be advised that this is at your own risk. What I did was navigating to the AppsData folder (which is a hidden folder) and finding the script that root676 changed there (Qneat3Framework.py). You can open it with a text editor such as word pad or notepad ++ f.x. Don't open it with microsoft word or similar. I then copy - pasted the whole updated script from github into the Qneat3Framework.py script, overwriting everything that was previously there. You can just select all and then paste to do that ;). Then I saved the file and closed it, and restarted QGIS. This solved my issue. |
@marteinnm thanks for testing and your helping explanations! @amacart13 I just uploaded the plugin to the QGIS plugin repository awaiting approval. An update should show up in your qgis plugin manager as soon as the team at QGIS has approved the version (1-2 Days, maybe earlier). |
@root676 Thanks, everything is working! |
Trying to run the Iso Area As Polygons and neither tool works for point or layer.
Using the same input I can get Iso Area As interpolation to work.
Network layer is in the same CRS as the project and the point layer.
Before the error the process
QNEAT3\algs\IsoAreaAsPolygonsFromPoint.py", line 249, in processAlgorithm
polygon_featurelist = net.calcIsoPolygons(max_dist, interval, output_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Qneat3Framework.py", line 493, in calcIsoPolygons
for collection in contours.collections:
^^^^^^^^^^^^^^^^^^^^
AttributeError: 'QuadContourSet' object has no attribute 'collections'
QGIS version: 3.34.15-Prizren
QGIS code revision: 386f2583
Qt version: 5.15.13
Python version: 3.12.8
GDAL version: 3.10.1
GEOS version: 3.13.0-CAPI-1.19.0
PROJ version: Rel. 9.5.1, December 1st, 2024
PDAL version: 2.8.3 (git-version: 56e405)
sys.version
'3.12.8 (main, Dec 20 2024, 15:21:15) [MSC v.1938 64 bit (AMD64)]'
Before the process the following is shown in the log:
[QNEAT3Algorithm] Calculating Iso-Pointcloud...
[QNEAT3Network][calcIsoPoints] Processing Point 0
[QNEAT3Network][calcIsoPoints] Added 10000 Nodes to iso pointcloud...
[QNEAT3Network][calcIsoPoints] Added 20000 Nodes to iso pointcloud...
[QNEAT3Network][calcIsoPoints] Added 30000 Nodes to iso pointcloud...
[QNEAT3Network][calcIsoPoints] Added 40000 Nodes to iso pointcloud...
[QNEAT3Network][calcIsoPoints] Added 50000 Nodes to iso pointcloud...
[QNEAT3Network][calcIsoPoints] Added 60000 Nodes to iso pointcloud...
[QNEAT3Network][calcIsoPoints] Added 70000 Nodes to iso pointcloud...
[QNEAT3Network][calcIsoPoints] Added 80000 Nodes to iso pointcloud...
[QNEAT3Algorithm] Calculating Iso-Interpolation-Raster using QGIS TIN-Interpolator...
[QNEAT3Algorithm] Calculating Iso-Polygons using numpy and matplotlib...
[QNEAT3Network][calcIsoPolygons] calculating 500.0-level contours
Then right after I get the error as shown above with a filepath.
Could this be a problem with matplotlib versioning?
I read the following: MatplotlibDeprecationWarning: The collections attribute was deprecated in Matplotlib 3.8 and will be removed two minor releases later
Collections attribute deprecation in version > 3.8
The text was updated successfully, but these errors were encountered: