Re: [Qgis-user] Python error on startup
On 11/27/21 9:26 AM, Dario C wrote: > since I've installed Qgis Network I receive this python error: Qgis Network? Not sure what you mean here??? > WARNING Traceback (most recent call last): > File > "C:\OSGeo4W/apps/qgis-ltr/./python/plugins\processing\script\ScriptAlgorithmProvider.py", > line 112, in loadAlgorithms > folder = ScriptUtils.resetScriptFolder(folder) > File > "C:\OSGeo4W/apps/qgis-ltr/./python/plugins\processing\script\ScriptUtils.py", > line 114, in resetScriptFolder > commonSettingPath = os.path.join(paths[appIndex], > paths[profileIndex]) > IndexError: list index out of range See https://github.com/qgis/QGIS/blob/master/python/plugins/processing/script/ScriptUtils.py#L111-L115 You could try to replay those lines in the QGIS Python console (either from within QGIS, OR from within osgeo4w python commandline). Have a look in what the variable currentSettingPath is for you, same for paths, apparently one of those (after you split them with \ (your os-path-sepator) does NOT contain enough items to be able to find either the 3thr or 4th FROM THE LAST ONE BACK (-3 means 3thr from the back). Maybe your qgisSettingsDirPath contain something strange? OR are in a 'strange' place... Mmm, thinking about this: indeed if you startup QGIS with some custom profiles dir, AND you define it with something else as your os.sep (which on Windows is \ so if you use /) then the paths-array will be too short to find the -4 or -3 element... So: please show us your QgsApplication.qgisSettingsDirPath() :-) (hope this make sense to you) Regards, Richard Duivenvoorde ___ Qgis-user mailing list Qgis-user@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
Re: [Qgis-user] Python error on startup
Hi, Next time, I recommend you install Anaconda Python. It come with a number of scientific packages. You can indicate during the installation that you do not want to change the environment variables. Nicolas > Le 22 nov. 2016 à 16:06, Stephen Ban [via OSGeo.org] > a écrit : > > Oddly, I was able to fix it by simply reinstalling/upgrading numpy in my > existing Python 2.7 install. > > > > It doesn’t make any sense to me, but it works. > > > > From: Qgis-user [mailto:[hidden email]] On Behalf Of Nicolas Cadieux > Sent: November 22, 2016 12:22 PM > To: [hidden email] > Subject: Re: [Qgis-user] Python error on startup > > > > Hi, > > You need to change your default Python to the one that qgis uses. You can > change that in the windows environment variables > > Nicolas > > > Le 22 nov. 2016 à 14:38, Stephen Ban [via OSGeo.org] <[hidden email]> a écrit > : > > Hi, > > > > I recently started getting an error message when launching QGIS. I can’t > pinpoint exactly when it started happening, but I’m pretty sure it must be > related to a recent install of Python when I had both Python 2.7 and 3.5 > installed. I also have ArcGIS on my machine, so that was the only Python > version installed for awhile. I then installed Python 3.5 to do some testing, > but have since uninstalled it so the only remaining standalone Python version > is ArcGIS’s 2.7. I’ve purged any extraneous Python environment variables and > cleaned the Windows registry to no effect. I’m running Windows 10 64-bit > edition, and have always installed the 64-bit versions of QGIS. > > > > I was originally running GQIS 2.16.1, then uninstalled it and installed QGIS > 2.18. Both versions give me the same error message on startup: “Python error: > Couldn’t load plugin ‘processing’ See message log (Python Error) for more > details.” The Python message log contains the following: > “1 Traceback (most recent call last): > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 308, in > loadPlugin > > __import__(packageName) > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\__init__.py", > line 29, in > > from processing.tools.general import * # NOQA > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\tools\general.py", > line 31, in > > from processing.core.Processing import Processing > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\core\Processing.py", > line 55, in > > from processing.algs.qgis.QGISAlgorithmProvider import QGISAlgorithmProvider > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\algs\qgis\QGISAlgorithmProvider.py", > line 109, in > > from .RasterLayerStatistics import RasterLayerStatistics > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\algs\qgis\RasterLayerStatistics.py", > line 36, in > > from processing.tools import raster > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\tools\raster.py", > line 29, in > > import numpy > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:\Users\steph\AppData\Roaming\Python\Python27\site-packages\numpy\__init__.py", > line 180, in > > from . import add_newdocs > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _imp
Re: [Qgis-user] Python error on startup
Oddly, I was able to fix it by simply reinstalling/upgrading numpy in my existing Python 2.7 install. It doesn’t make any sense to me, but it works. From: Qgis-user [mailto:qgis-user-boun...@lists.osgeo.org] On Behalf Of Nicolas Cadieux Sent: November 22, 2016 12:22 PM To: qgis-user@lists.osgeo.org Subject: Re: [Qgis-user] Python error on startup Hi, You need to change your default Python to the one that qgis uses. You can change that in the windows environment variables Nicolas Le 22 nov. 2016 à 14:38, Stephen Ban [via OSGeo.org <http://OSGeo.org> ] <[hidden email]> a écrit : Hi, I recently started getting an error message when launching QGIS. I can’t pinpoint exactly when it started happening, but I’m pretty sure it must be related to a recent install of Python when I had both Python 2.7 and 3.5 installed. I also have ArcGIS on my machine, so that was the only Python version installed for awhile. I then installed Python 3.5 to do some testing, but have since uninstalled it so the only remaining standalone Python version is ArcGIS’s 2.7. I’ve purged any extraneous Python environment variables and cleaned the Windows registry to no effect. I’m running Windows 10 64-bit edition, and have always installed the 64-bit versions of QGIS. I was originally running GQIS 2.16.1, then uninstalled it and installed QGIS 2.18. Both versions give me the same error message on startup: “Python error: Couldn’t load plugin ‘processing’ See message log (Python Error) for more details.” The Python message log contains the following: “1 Traceback (most recent call last): File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 308, in loadPlugin __import__(packageName) File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\__init__.py", line 29, in from processing.tools.general import * # NOQA File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\tools\general.py", line 31, in from processing.core.Processing import Processing File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\core\Processing.py", line 55, in from processing.algs.qgis.QGISAlgorithmProvider import QGISAlgorithmProvider File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\algs\qgis\QGISAlgorithmProvider.py", line 109, in from .RasterLayerStatistics import RasterLayerStatistics File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\algs\qgis\RasterLayerStatistics.py", line 36, in from processing.tools import raster File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\tools\raster.py", line 29, in import numpy File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\steph\AppData\Roaming\Python\Python27\site-packages\numpy\__init__.py", line 180, in from . import add_newdocs File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\steph\AppData\Roaming\Python\Python27\site-packages\numpy\add_newdocs.py", line 13, in from numpy.lib import add_newdoc File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\steph\AppData\Roaming\Python\Python27\site-packages\numpy\lib\__init__.py", line 8, in from .type_check import * File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in _import mod = _builtin_import(name, globals, locals, fromlist, level) File "C:\Users\steph\AppData\Roaming\Python\Python27\site-packages\numpy\lib\type_check.py", line 11, in import numpy.core.numeric as _nx File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py
Re: [Qgis-user] Python error on startup
Hi, You need to change your default Python to the one that qgis uses. You can change that in the windows environment variables Nicolas > Le 22 nov. 2016 à 14:38, Stephen Ban [via OSGeo.org] > a écrit : > > Hi, > > > > I recently started getting an error message when launching QGIS. I can’t > pinpoint exactly when it started happening, but I’m pretty sure it must be > related to a recent install of Python when I had both Python 2.7 and 3.5 > installed. I also have ArcGIS on my machine, so that was the only Python > version installed for awhile. I then installed Python 3.5 to do some testing, > but have since uninstalled it so the only remaining standalone Python version > is ArcGIS’s 2.7. I’ve purged any extraneous Python environment variables and > cleaned the Windows registry to no effect. I’m running Windows 10 64-bit > edition, and have always installed the 64-bit versions of QGIS. > > > > I was originally running GQIS 2.16.1, then uninstalled it and installed QGIS > 2.18. Both versions give me the same error message on startup: “Python error: > Couldn’t load plugin ‘processing’ See message log (Python Error) for more > details.” The Python message log contains the following: > “1 Traceback (most recent call last): > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 308, in > loadPlugin > > __import__(packageName) > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\__init__.py", > line 29, in > > from processing.tools.general import * # NOQA > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\tools\general.py", > line 31, in > > from processing.core.Processing import Processing > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\core\Processing.py", > line 55, in > > from processing.algs.qgis.QGISAlgorithmProvider import QGISAlgorithmProvider > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\algs\qgis\QGISAlgorithmProvider.py", > line 109, in > > from .RasterLayerStatistics import RasterLayerStatistics > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\algs\qgis\RasterLayerStatistics.py", > line 36, in > > from processing.tools import raster > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python/plugins\processing\tools\raster.py", > line 29, in > > import numpy > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:\Users\steph\AppData\Roaming\Python\Python27\site-packages\numpy\__init__.py", > line 180, in > > from . import add_newdocs > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:\Users\steph\AppData\Roaming\Python\Python27\site-packages\numpy\add_newdocs.py", > line 13, in > > from numpy.lib import add_newdoc > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:\Users\steph\AppData\Roaming\Python\Python27\site-packages\numpy\lib\__init__.py", > line 8, in > > from .type_check import * > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:\Users\steph\AppData\Roaming\Python\Python27\site-packages\numpy\lib\type_check.py", > line 11, in > > import numpy.core.numeric as _nx > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builtin_import(name, globals, locals, fromlist, level) > > File > "C:\Users\steph\AppData\Roaming\Python\Python27\site-packages\numpy\core\__init__.py", > line 14, in > > from . import multiarray > > File "C:/PROGRA~1/QGIS21~1.1/apps/qgis/./python\qgis\utils.py", line 607, in > _import > > mod = _builti