[Qgis-user] PyQGIS console error in QGIS 3.8.2

Damián Ortega Terol dortegat at gmail.com
Thu Sep 12 04:09:28 PDT 2019


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20190912/97bd0970/attachment.html>


More information about the Qgis-user mailing list