Orange Forum • View topic - Orange Canvas doesn't work, ASCII problem

Orange Canvas doesn't work, ASCII problem

A place to ask questions about methods in Orange and how they are used and other general support.

Orange Canvas doesn't work, ASCII problem

Postby tomzek » Wed Mar 20, 2013 11:14

I can't get my Orange Canvas to work, because I have a non ASCII letter in my User name.
Any suggestion?

Error code (see last line):

There were problems importing the following widgets:
OWC45Tree: c45 is not found
OWItemsetViz: No module named OWNetworkCanvas
OWRScript: No module named rpy2.robjects
OWLinProj3D: No module named OpenGL
OWNxExplorer3D: No module named OWNxExplorerQt
OWScatterPlot3D: No module named OpenGL
OWSphereviz3D: No module named OpenGL
The following widgets could not be imported and will not be available: OWSphereviz3D, OWScatterPlot3D, OWLinProj3D, OWC45Tree, OWNxExplorer3D.
The following prototype widgets could not be imported and will not be available: OWRScript, OWItemsetViz.

Unhandled exception of type UnicodeDecodeError occured at 11:16:20:
Traceback:
File: orngDoc.py, line 276 in addWidget
Code: newwidget = orngCanvasItems.CanvasWidget(self.signalManager, self.canvas, self.canvasView, widgetInfo, self.canvasDlg.defaultPic, self.canvasDlg, widgetSettings)
File: orngCanvasItems.py, line 284 in __init__
Code: self.instance.__init__(signalManager=signalManager)
File: OWDataDomain.py, line 292 in __init__
Code: self.loadSettings()
File: OWBaseWidget.py, line 485 in loadSettings
Code: file = self.getSettingsFile(file)
File: OWBaseWidget.py, line 468 in getSettingsFile
Code: file = os.path.join(self.widgetSettingsDir, self.captionTitle + ".ini")
File: ntpath.py, line 108 in join
Code: path += "\\" + b
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9e in position 13: ordinal not in range(128)

Re: Orange Canvas doesn't work, ASCII problem

Postby Ales » Wed Mar 20, 2013 13:21

Try this workaround:

Create a windows batch '.bat' file on the desktop (for instance 'orange.bat'), and write this in it
Code: Select all
set APPDATA=C:\some\all\ascii\path
C:\Python27\python.exe C:\Python27\Lib\site-packages\Orange\OrangeCanvas\orngCanvas.pyw
and try running it.

Make sure it is actually a .bat and not a .bat.txt file (if windows hides the extension)

Re: Orange Canvas doesn't work, ASCII problem

Postby tomzek » Wed Mar 20, 2013 16:32

It works :).

Thanks

Re: Orange Canvas doesn't work, ASCII problem

Postby oyvinrog » Sun Jun 08, 2014 16:57

This solution did not work for me. I investigated the issue, and found that the 'Ø' character in my Windows username caused the error. I resolved the issue by editing the line in genericpath.py from "os.stat(path) to os.stat(Unicode(path))

now everything Works fine

Re: Orange Canvas doesn't work, ASCII problem

Postby oyvinrog » Sun Jun 08, 2014 17:07

PS: I also had to create the .bat file mentioned above to make it work


Return to Questions & Support