Bug report #9672

Failed to open Python console: UnicodeDecodeError in console_output.py

Added by Raphael Luthi over 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:-
Affected QGIS version:2.2.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 #:18239

Description

Operating Syste: Windows 7 (64 bit)

QGIS: 2.2.0 - Valmiera

Installation: osgeo4w (64bit)

Problem: When I try to open the Python Console ("Plugins" --> "Python Console") an error message appears. When I close error window, I am back on QGIS interface.
I have already tried to re-install everything, but it didn't fix the problem. I also tried going into the file and changing utf8 encoding to ascii, but the file is protected and I cannot save it once modified.

Failed to open Python console:

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

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

QGIS version:
2.2.0-Valmiera 'Valmiera', c3a2817

Python path:
['C:/OSGEO4~1/apps/qgis/./python/plugins\\\\processing', 'C:/OSGEO4~1/apps/qgis/./python', u'C:/Users/raphael_luthi/.qgis2/python',u'C:/Users/raphael_luthi/.qgis2/python/plugins', 'C:/OSGEO4~1/apps/qgis/./python/plugins', 'C:\\\\OSGEO4~1\\\\bin\\\\python27.zip', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\DLLs', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\plat-win', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\lib-tk', 'C:\\\\OSGEO4~1\\\\bin', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\PIL', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\win32\\\\lib', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Pythonwin', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\Shapely-1.2.18-py2.7-win-amd64.egg', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\six-1.3.0-py2.7.egg', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\wx-2.8-msw-unicode', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\xlrd-0.9.2-py2.7.egg', 'C:\\\\OSGEO4~1\\\\apps\\\\Python27\\\\lib\\\\site-packages\\\\xlwt-0.7.5-py2.7.egg', '/usr/share/qgis/python', 'C:\\\\OSGEO4~1\\\\apps\\\\qgis\\\\python\\\\plugins\\\\fTools\\\\tools']

Related issues

Duplicated by QGIS Application - Bug report #10838: Cannot run Python Console Closed 2014-07-07
Duplicates QGIS Application - Bug report #9673: some polygons not labelled when layer's simplification is on Closed 2014-02-27

History

#1 Updated by Salvatore Larosa over 6 years ago

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

Duplicate of #9573.

Please can you provide your hostname?
To get your hostname open the windows cmd command line and type ipconfig/all

Also available in: Atom PDF