Bug report #15279

QGIS 2.16 barfs with a severe python error during startup (can't find "qgis.core")

Added by Bo Thomsen over 8 years ago. Updated over 8 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:-
Category:Build/Install
Affected QGIS version:2.16.0 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:23214

Description

When you start QGIS 2.16 it barfs with the following error:

Couldn't load PyQGIS.
Python support will be disabled.

Traceback (most recent call last):
File "", line 1, in
ImportError: No module named qgis.core

Python version:
2.7.5 (default, May 15 2013, 22:44:16) [MSC v.1500 64 bit (AMD64)]

QGIS version:
2.16.0-Nødebo 'Nødebo', d0b3e39

Python path:
['C:/PROGRA~1/QGIS N\\xc3\\xb8debo/apps/qgis/./python', u'C:/Users/bvtho/.qgis2/python', u'C:/Users/bvtho/.qgis2/python/plugins', 'C:/PROGRA~1/QGIS >N\\xc3\\xb8debo/apps/qgis/./python/plugins', 'C:\\\\PROGRA~1\\\\QGIS >N\\xf8debo\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\matplotlib-1.3.1-py2.7-win-amd64.egg', >'C:\\\\PROGRA~1\\\\QGIS N\\xf8debo\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\

ose-1.3.3-py2.7.egg', 'C:\\\\PROGRA~1\\\\QGIS >N\\xf8debo\\\\apps\\\\Python27\\\\lib\\\\site->packages\\\\tornado-4.0.1-py2.7-win-amd64.egg', 'C:\\\\PROGRA~1\\\\QGIS N\\xf8debo\\\\apps\\\\Python27\\\\lib\\\\site-pack>

(and more Python path statements...)

QGIS then starts normally, but without Python support

AFAIK, the problem is the use of the character "ø" (o-slash) in the directory name for the QGIS program directory: "C:\\Program Files\\QGIS Nødebo". If you make a name change of the installation directory to ex. "C:\\Program Files\\QGIS Noedebo" it works without a hitch.

(As a Dane, I would never use local danish "æøå" or other accented character in file or directory names that might be installed on windows-pc's with different encoding than "Latin1", ex. slavic windows pc's.)

The specific problem might the representation of "ø" in the Python path: There is 2 different versions: "N\\xc3\\xb8debo" and "N\\xf8debo"

"\\xf8" -> "ø" in Latin1 encoding.
"\\xc3\\xb8" -> UTF-8 "ø" -> "ø" (if UTF8 "ø" is interpreted as a 2 character Latin1 encoded string).

QGIS ver. 2.16 64 bit, Stand-alone installation, Windows-7 64 bit

History

#1 Updated by Giovanni Manghi over 8 years ago

  • Category changed from Python plugins to Build/Install

#2 Updated by Andre Joost over 8 years ago

Should be solved with the recent installer QGIS-OSGeo4W-2.16.0-2-Setup-x86_64.exe which installs to C:\\Program files\\QGIS 2.16.0.

At least it now works for me.

#3 Updated by Jürgen Fischer over 8 years ago

  • Resolution set to fixed/implemented
  • Status changed from Open to Closed

standalone installer issue fixed.

Also available in: Atom PDF