Bug report #10838

Cannot run Python Console

Added by dr - over 10 years ago. Updated over 10 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:PyQGIS Console
Affected QGIS version:2.4.0 Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:19212

Description

This bug was described at one of the local gis forum. I cannot reproduce it because I don't have Windows machine.


Traceback (most recent call last):
File "", line 2, in 
File "C:/OSGeo4W/apps/qgis-dev/./python\\console\\console.py", line 43, in show_console
_console = PythonConsole( parent )
File "C:/OSGeo4W/apps/qgis-dev/./python\\console\\console.py", line 75, in __init__
self.console = PythonConsoleWidget(self)
File "C:/OSGeo4W/apps/qgis-dev/./python\\console\\console.py", line 101, in __init__
self.shellOut = ShellOutputScintilla(self)
File "C:/OSGeo4W/apps/qgis-dev/./python\\console\\console_output.py", line 103, in __init__
self.insertInitText()
File "C:/OSGeo4W/apps/qgis-dev/./python\\console\\console_output.py", line 145, in insertInitText
socket.gethostname())
UnicodeDecodeError: 'ascii' codec can't decode byte 0xcf in position 6: ordinal not in range(128)

Версия Python:
2.7.4 (default, Apr 6 2013, 19:54:46) [MSC v.1500 32 bit (Intel)]

Версия QGIS:
2.5.0-Master 'Master', 1088ba7

Путь поиска Python:
['C:/OSGeo4W/apps/qgis-dev/./python/plugins\\\\processing', 'C:/OSGeo4W/apps/qgis-dev/./python', u'C:/Users/vovan/.qgis2/python', u'C:/Users/vovan/.qgis2/python/plugins', 'C:/OSGeo4W/apps/qgis-dev/./python/plugins', 'C:\\\\OSGeo4W\\\\bin\\\\python27.zip', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\DLLs', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\OSGeo4W\\\\bin', 'C:\\\\OSGeo4W\\\\apps\\\\Python27', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\GDAL-1.11.0-py2.7-win32.egg', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\PIL', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\jinja2-2.7.2-py2.7.egg', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\markupsafe-0.23-py2.7-win32.egg', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\python_dateutil-2.2-py2.7.egg', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\pytz-2014.2-py2.7.egg', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\six-1.6.1-py2.7.egg', 'C:\\\\OSGeo4W\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode', 'C:\\\\OSGeo4W\\\\apps\\\\qgis-dev\\\\python\\\\plugins\\\\fTools\\\\tools']

It looks like this issue occurs when hostname contains non ASCII symbols.


Related issues

Duplicates QGIS Application - Bug report #9672: Failed to open Python console: UnicodeDecodeError in cons... Closed 2014-02-26

History

#1 Updated by Jürgen Fischer over 10 years ago

  • Resolution set to duplicate
  • Status changed from Open to Closed

duplicate of #9672

Also available in: Atom PDF