Bug report #16892
Updated by Jürgen Fischer about 7 years ago
For days now, Launching QGIS nightly from osgeo4w 64bit result in a "Processing couldn't load" error with
_ImportError: No module named expat; use SimpleXMLTreeBuilder instead_ message
During installation process I checked the libraries and there's an expat package at version 2.1.0-1 enabled.
Any Ideas?
Below the stacktrace:
<pre>
> ImportError: No module named expat; use SimpleXMLTreeBuilder instead
> Traceback (most recent call last):
> File "C:\OSGEO4~1\apps\Python36\lib\xml\etree\ElementTree.py", line 1448, in __init__
> from xml.parsers import expat
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:\OSGEO4~1\apps\Python36\lib\xml\parsers\expat.py", line 4, in
> from pyexpat import *
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> ImportError: DLL load failed: Le module spécifié est introuvable.
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "C:\OSGEO4~1\apps\Python36\lib\xml\etree\ElementTree.py", line 1451, in __init__
> import pyexpat as expat
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> ImportError: DLL load failed: Le module spécifié est introuvable.
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 312, in loadPlugin
> __import__(packageName)
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\__init__.py", line 29, in
> from processing.tools.general import * # NOQA
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\tools\general.py", line 46, in
> from processing.core.Processing import Processing
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\core\Processing.py", line 53, in
> from processing.gui.MessageBarProgress import MessageBarProgress
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\gui\MessageBarProgress.py", line 32, in
> from processing.gui.MessageDialog import MessageDialog
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\gui\MessageDialog.py", line 38, in
> os.path.join(pluginPath, 'ui', 'DlgMessage.ui'))
> File "C:\OSGEO4~1\apps\Python36\lib\site-packages\PyQt5\uic\__init__.py", line 198, in loadUiType
> winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, resource_suffix, import_from)
> File "C:\OSGEO4~1\apps\Python36\lib\site-packages\PyQt5\uic\Compiler\compiler.py", line 110, in compileUi
> w = self.parse(input_stream, resource_suffix)
> File "C:\OSGEO4~1\apps\Python36\lib\site-packages\PyQt5\uic\uiparser.py", line 1002, in parse
> document = parse(filename)
> File "C:\OSGEO4~1\apps\Python36\lib\xml\etree\ElementTree.py", line 1196, in parse
> tree.parse(source, parser)
> File "C:\OSGEO4~1\apps\Python36\lib\xml\etree\ElementTree.py", line 591, in parse
> parser = XMLParser()
> File "C:\OSGEO4~1\apps\Python36\lib\xml\etree\ElementTree.py", line 1454, in __init__
> "No module named expat; use SimpleXMLTreeBuilder instead"
> ImportError: No module named expat; use SimpleXMLTreeBuilder instead
>
>
> Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]
> QGIS version: 2.99.0-Master Master, d70f53c
>
> Python Path:
> C:/OSGEO4~1/apps/qgis-dev/./python
> C:/Users/DelazJ/.qgis3/python
> C:/Users/DelazJ/.qgis3/python/plugins
> C:/OSGEO4~1/apps/qgis-dev/./python/plugins
> C:\OSGeo4W64\apps\Python27\DLLs
> C:\OSGeo4W64\bin\python36.zip
> C:\OSGEO4~1\apps\Python36\DLLs
> C:\OSGEO4~1\apps\Python36\lib
> C:\OSGeo4W64\bin
> C:\OSGEO4~1\apps\Python36
> C:\OSGEO4~1\apps\Python36\lib\site-packages
> C:/Users/DelazJ/.qgis3//python
</pre>
_ImportError: No module named expat; use SimpleXMLTreeBuilder instead_ message
During installation process I checked the libraries and there's an expat package at version 2.1.0-1 enabled.
Any Ideas?
Below the stacktrace:
<pre>
> ImportError: No module named expat; use SimpleXMLTreeBuilder instead
> Traceback (most recent call last):
> File "C:\OSGEO4~1\apps\Python36\lib\xml\etree\ElementTree.py", line 1448, in __init__
> from xml.parsers import expat
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:\OSGEO4~1\apps\Python36\lib\xml\parsers\expat.py", line 4, in
> from pyexpat import *
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> ImportError: DLL load failed: Le module spécifié est introuvable.
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "C:\OSGEO4~1\apps\Python36\lib\xml\etree\ElementTree.py", line 1451, in __init__
> import pyexpat as expat
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> ImportError: DLL load failed: Le module spécifié est introuvable.
>
> During handling of the above exception, another exception occurred:
>
> Traceback (most recent call last):
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 312, in loadPlugin
> __import__(packageName)
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\__init__.py", line 29, in
> from processing.tools.general import * # NOQA
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\tools\general.py", line 46, in
> from processing.core.Processing import Processing
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\core\Processing.py", line 53, in
> from processing.gui.MessageBarProgress import MessageBarProgress
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\gui\MessageBarProgress.py", line 32, in
> from processing.gui.MessageDialog import MessageDialog
> File "C:/OSGEO4~1/apps/qgis-dev/./python\qgis\utils.py", line 647, in _import
> mod = _builtin_import(name, globals, locals, fromlist, level)
> File "C:/OSGEO4~1/apps/qgis-dev/./python/plugins\processing\gui\MessageDialog.py", line 38, in
> os.path.join(pluginPath, 'ui', 'DlgMessage.ui'))
> File "C:\OSGEO4~1\apps\Python36\lib\site-packages\PyQt5\uic\__init__.py", line 198, in loadUiType
> winfo = compiler.UICompiler().compileUi(uifile, code_string, from_imports, resource_suffix, import_from)
> File "C:\OSGEO4~1\apps\Python36\lib\site-packages\PyQt5\uic\Compiler\compiler.py", line 110, in compileUi
> w = self.parse(input_stream, resource_suffix)
> File "C:\OSGEO4~1\apps\Python36\lib\site-packages\PyQt5\uic\uiparser.py", line 1002, in parse
> document = parse(filename)
> File "C:\OSGEO4~1\apps\Python36\lib\xml\etree\ElementTree.py", line 1196, in parse
> tree.parse(source, parser)
> File "C:\OSGEO4~1\apps\Python36\lib\xml\etree\ElementTree.py", line 591, in parse
> parser = XMLParser()
> File "C:\OSGEO4~1\apps\Python36\lib\xml\etree\ElementTree.py", line 1454, in __init__
> "No module named expat; use SimpleXMLTreeBuilder instead"
> ImportError: No module named expat; use SimpleXMLTreeBuilder instead
>
>
> Python version: 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)]
> QGIS version: 2.99.0-Master Master, d70f53c
>
> Python Path:
> C:/OSGEO4~1/apps/qgis-dev/./python
> C:/Users/DelazJ/.qgis3/python
> C:/Users/DelazJ/.qgis3/python/plugins
> C:/OSGEO4~1/apps/qgis-dev/./python/plugins
> C:\OSGeo4W64\apps\Python27\DLLs
> C:\OSGeo4W64\bin\python36.zip
> C:\OSGEO4~1\apps\Python36\DLLs
> C:\OSGEO4~1\apps\Python36\lib
> C:\OSGeo4W64\bin
> C:\OSGEO4~1\apps\Python36
> C:\OSGEO4~1\apps\Python36\lib\site-packages
> C:/Users/DelazJ/.qgis3//python
</pre>