[Qgis-user] PyQGIS console error in QGIS 3.8.2

Luigi Pirelli luipir at gmail.com
Thu Sep 12 04:30:41 PDT 2019


seems you have something work in your numpy installation of how how qgis
installation is getting the numpy library . fail some dependency (beter use
OSGeo4W installer thatn standalone) or loading the wrong dll because some
other numpy installation somewhere in your system.

it seems more a qgis packaging problem (for standalone) or local problem

Luigi Pirelli

**************************************************************************************************
* LinkedIn: https://www.linkedin.com/in/luigipirelli
* Stackexchange: http://gis.stackexchange.com/users/19667/luigi-pirelli
* GitHub: https://github.com/luipir
* Book: Mastering QGIS3 - 3rd Edition
<https://www.packtpub.com/eu/application-development/mastering-geospatial-development-qgis-3x-third-edition>
* Hire a team: http://www.qcooperative.net
**************************************************************************************************


On Thu, 12 Sep 2019 at 13:11, Damián Ortega Terol <dortegat at gmail.com>
wrote:

> I have problem with python console in QGIS.
>
> Traceback (most recent call last):
>   File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\code.py", line 90, in runcode
>     exec(code, self.locals)
>   File "", line 1, in
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 737, in _import
>     mod = _builtin_import(name, globals, locals, fromlist, level)
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python/plugins\processing\__init__.py", line 25, in
>     from processing.tools.general import *              # NOQA
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 737, in _import
>     mod = _builtin_import(name, globals, locals, fromlist, level)
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python/plugins\processing\tools\general.py", line 32, in
>     from processing.core.Processing import Processing
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 737, in _import
>     mod = _builtin_import(name, globals, locals, fromlist, level)
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python/plugins\processing\core\Processing.py", line 54, in
>     from processing.algs.qgis.QgisAlgorithmProvider import QgisAlgorithmProvider  # NOQA
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 737, in _import
>     mod = _builtin_import(name, globals, locals, fromlist, level)
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python/plugins\processing\algs\qgis\QgisAlgorithmProvider.py", line 76, in
>     from .HypsometricCurves import HypsometricCurves
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 737, in _import
>     mod = _builtin_import(name, globals, locals, fromlist, level)
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python/plugins\processing\algs\qgis\HypsometricCurves.py", line 25, in
>     import numpy
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 737, in _import
>     mod = _builtin_import(name, globals, locals, fromlist, level)
>   File "C:\Users\avillena\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 142, in
>     from . import core
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\qgis\utils.py", line 737, in _import
>     mod = _builtin_import(name, globals, locals, fromlist, level)
>   File "C:\Users\avillena\AppData\Roaming\Python\Python37\site-packages\numpy\core\__init__.py", line 23, in
>     WinDLL(os.path.abspath(filename))
>   File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\ctypes\__init__.py", line 356, in __init__
>     self._handle = _dlopen(self._name, mode)
> OSError: [WinError 193] %1 no es una aplicación Win32 válida
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
>   File "", line 2, in
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\console\console.py", line 46, in show_console
>     _console = PythonConsole(parent)
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\console\console.py", line 82, in __init__
>     self.console = PythonConsoleWidget(self)
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\console\console.py", line 112, in __init__
>     self.shell = ShellScintilla(self)
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\console\console_sci.py", line 92, in __init__
>     self.runsource(line)
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\console\console_sci.py", line 661, in runsource
>     return super(ShellScintilla, self).runsource(source, filename, symbol)
>   File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\code.py", line 74, in runsource
>     self.runcode(code)
>   File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\code.py", line 94, in runcode
>     self.showtraceback()
>   File "C:\PROGRA~1\QGIS3~1.8\apps\Python37\lib\code.py", line 148, in showtraceback
>     sys.excepthook(ei[0], ei[1], last_tb)
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\console\console_sci.py", line 657, in excepthook
>     self.write("".join(traceback.format_exception(etype, value, tb)))
>   File "C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python\console\console_sci.py", line 641, in write
>     sys.stderr.write(txt)
> AttributeError: 'NoneType' object has no attribute 'write'
>
>
>
> Versión de Python:
> 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)]
>
> Versión de QGIS:
> 3.8.2-Zanzibar 'Zanzibar', 4470baa1a3
>
> Ruta de Python:
> ['C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python', 'C:/Users/avillena/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 'C:/Users/avillena/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python/plugins', 'C:/PROGRA~1/QGIS3~1.8/apps/qgis/./python/plugins', 'C:\\Program Files\\QGIS 3.8\\bin\\python37.zip', 'C:\\PROGRA~1\\QGIS3~1.8\\apps\\Python37\\DLLs', 'C:\\PROGRA~1\\QGIS3~1.8\\apps\\Python37\\lib', 'C:\\Program Files\\QGIS 3.8\\bin', 'C:\\Users\\avillena\\AppData\\Roaming\\Python\\Python37\\site-packages', 'C:\\PROGRA~1\\QGIS3~1.8\\apps\\Python37', 'C:\\PROGRA~1\\QGIS3~1.8\\apps\\Python37\\lib\\site-packages', 'C:\\PROGRA~1\\QGIS3~1.8\\apps\\Python37\\lib\\site-packages\\win32', 'C:\\PROGRA~1\\QGIS3~1.8\\apps\\Python37\\lib\\site-packages\\win32\\lib', 'C:\\PROGRA~1\\QGIS3~1.8\\apps\\Python37\\lib\\site-packages\\Pythonwin', 'C:/Users/avillena/AppData/Roaming/QGIS/QGIS3\\profiles\\default/python', 'D:/Temp/TE']
>
>
> I found similar problems in https://github.com/qgis/QGIS/issues/31169 and QGIS
> 3.2 problem with Python console
> <https://gis.stackexchange.com/questions/296032/qgis-3-2-problem-with-python-console>
>
> But I don't know how to solve it
>
>
>
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190912/555d8ae9/attachment-0001.html>


More information about the Qgis-user mailing list