Skip to main content

Bug: Read file > Load file

Posted in

Valid for dev and compiled:
Installed from Red-R-1.80-2010.09.16.r990.exe on XP 32-bits.
Installed from Red-R-1.80-Dev-2010.09.16.r990.exe on XP 32-bits.

Read file widget, load file section, allows to browse file and open it, but then only "Select file" option appears in the dropdown list (the file selected does not appear). Error log:

############################################################
Unhandled exception of type UnicodeEncodeError occured at 2010-09-22 12:18:52.765000:
Traceback:
File: readFile.py, line 186 in browseFile
Code: print str(fn)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xc9' in position 32: ordinal not in range(128)
############################################################

Moreover, Red-R crashes when loading first example. Had to uncheck it to make Red-R interface launched.

Regards.

I think I have fixed the error with non-ascii characters.
A installer is available at: http://r-orange.googlecode.com/files/Red-R-1.80-2010.09.22.r998.exe

Please test is and let me know if it fixes the problem on your machine.

Thanks,
Anup

Great, thanks

Anup is working on updating red-r to handle non-ascii characters. for the moment these characters should be avoided in red-r.

The change will likely not be available until the next release.

Sorry for the inconvenience

Kyle

The path to the user's directory contains indeed a non-ascii character (É). I created a new account without "special" character, and Red-R works like a charm.

Thanks for letting me know about this. Again it's an error with ascii being able to write some text.

You wouldn't happen to have red-r or your user directory in a place that has some non-ascii characters? Characters that aren't in the 26 letters, 10 numbers, and other symbols?

That might be a persistent problem if you try to load in data from one of these directories.

I'm going to see if I can fix it. But it might take a while to catch everything. Thanks for reporting this.
Kyle

File readFile.py looks encoded properly. However, readFile.pyc looks bad. I couldn't fix anything (I'm not an programmer). Here is the log error when Red-R is launched with "Start example" checked. I was not able to copy-paste it, so I typed it - it may contain some mistakes.

##################################################
Unhandled exception of type UnicodeDecodeError occured at 2010-09-22 12:44:21.828000:
Traceback:
File: red-RCanvas.pyw, line 839 in <module>
File: red-RCanvas.pyw, line 821 in main
File: red-RCanvas.pyw, line 187 in __init__
File: red-RCanvas.pyw, line 207 in startSetupWizard
File: orngDoc.pyc, line 854 in loadDocument
File: orngDoc.pyc, line 879 in loadLines
File: redROutput.pyc line 105 in write
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc9 in position 2669: ordinal not in range (128)
##################################################

Looks like there might be a unicode character in the file name. Thanks for reporting this.

It might be possible for you to rename the file you are opening to avoid the u'\xc9' character and then read in the file.

Could you describe the crash? If you are reporting your errors could you tell what time they occurred so we can find them to diagnose?

Thanks
Kyle