Closed FLO-2DKaren closed 1 month ago
I got the same error.
On Tue, May 21, 2024 at 4:25 PM Karen @.***> wrote:
Has anyone seen this?
I get this error on Madiera. It has Python 12. I wonder if that's the issue.
Couldn't load plugin 'flo2d' due to an error when calling its classFactory() method
ImportError: cannot import name 'securetransport' from 'urllib3.contrib' (C:\OSGeo4W\apps\Python312\Lib\site-packages\urllib3\contrib_init.py) Traceback (most recent call last): File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 423, in
startPlugin plugins[packageName] = package.classFactory(iface) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\flo2d_init.py", line 19, in classFactory from .flo2d import Flo2D File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 892, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\flo2d\flo2d.py", line 71, in from urllib3.contrib import _securetransport ImportError: cannot import name 'securetransport' from 'urllib3.contrib' (C:\OSGeo4W\apps\Python312\Lib\site-packages\urllib3\contrib_init.py)
Python version: 3.12.3 (main, Apr 14 2024, 17:21:43) [MSC v.1938 64 bit (AMD64)] QGIS version: 3.34.7-Prizren Prizren, 6f7d735c
Python Path:
C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OpenTopography-DEM-Downloader
C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\curve_number_generator
C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\curve_number_generator\processing\algorithms\conus_nlcd_ssurgo C:/OSGeo4W/apps/qgis-ltr/./python C:/Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/OSGeo4W/apps/qgis-ltr/./python/plugins C:\OSGeo4W\bin\python312.zip C:\OSGeo4W\apps\Python312\DLLs C:\OSGeo4W\apps\Python312\Lib C:\OSGeo4W\bin C:\OSGeo4W\apps\Python312 C:\OSGeo4W\apps\Python312\Lib\site-packages C:\OSGeo4W\apps\Python312\Lib\site-packages\win32 C:\OSGeo4W\apps\Python312\Lib\site-packages\win32\lib C:\OSGeo4W\apps\Python312\Lib\site-packages\Pythonwin C:/Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python
C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\curve_number_generator\processing
C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\curve_number_generator\processing\algorithms\custom
— Reply to this email directly, view it on GitHub https://github.com/FLO-2DSoftware/qgis-flo-2d-plugin/issues/1346, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE32O3QCJE5HWLRBOW236PDZDOUVLAVCNFSM6AAAAABICKCH62VHI2DSMVQWIX3LMV43ASLTON2WKOZSGMYDSMBVG4ZDANA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Ok, I'll try to have this fixed today.
Done and merged on https://github.com/FLO-2DSoftware/qgis-flo-2d-plugin/pull/1347. An unused library was causing this error. Just commented out and it is working.
OK we need to do it on 115 too. Can you please tell me the line?
I can do it on v115. I'll do it and then update it online.
I fixed v115 and reposted it online.
The module is flo2d.py in line 71 in current master:
71 # from urllib3.contrib import _securetransport
it is commented.
Has anyone seen this?
I get this error on Madiera. It has Python 12. I wonder if that's the issue.
Couldn't load plugin 'flo2d' due to an error when calling its classFactory() method
ImportError: cannot import name '_securetransport' from 'urllib3.contrib' (C:\OSGeo4W\apps\Python312\Lib\site-packages\urllib3\contrib__init.py) Traceback (most recent call last): File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 423, in _startPlugin plugins[packageName] = package.classFactory(iface) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\flo2d__init__.py", line 19, in classFactory from .flo2d import Flo2D File "C:\OSGeo4W/apps/qgis-ltr/./python\qgis\utils.py", line 892, in _import mod = _builtin_import(name, globals, locals, fromlist, level) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\flo2d\flo2d.py", line 71, in from urllib3.contrib import _securetransport ImportError: cannot import name '_securetransport' from 'urllib3.contrib' (C:\OSGeo4W\apps\Python312\Lib\site-packages\urllib3\contrib\init__.py)
Python version: 3.12.3 (main, Apr 14 2024, 17:21:43) [MSC v.1938 64 bit (AMD64)] QGIS version: 3.34.7-Prizren Prizren, 6f7d735c
Python Path: C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\OpenTopography-DEM-Downloader C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\curve_number_generator C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\curve_number_generator\processing\algorithms\conus_nlcd_ssurgo C:/OSGeo4W/apps/qgis-ltr/./python C:/Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:/Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins C:/OSGeo4W/apps/qgis-ltr/./python/plugins C:\OSGeo4W\bin\python312.zip C:\OSGeo4W\apps\Python312\DLLs C:\OSGeo4W\apps\Python312\Lib C:\OSGeo4W\bin C:\OSGeo4W\apps\Python312 C:\OSGeo4W\apps\Python312\Lib\site-packages C:\OSGeo4W\apps\Python312\Lib\site-packages\win32 C:\OSGeo4W\apps\Python312\Lib\site-packages\win32\lib C:\OSGeo4W\apps\Python312\Lib\site-packages\Pythonwin C:/Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\curve_number_generator\processing C:\Users/karen/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\curve_number_generator\processing\algorithms\custom