Bugs item #989338, was opened at 2004-07-12 20:11 Message generated for change (Comment added) made by quiver You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=989338&group_id=5470
Category: Python Library Group: Python 2.4 Status: Closed Resolution: Fixed Priority: 5 Submitted By: Miki Tebeka (tebeka) Assigned to: Nobody/Anonymous (nobody) Summary: test_unicode_file fails on win2k Initial Comment: >>> test_support.verbose = 1 >>> test_unicode_file.test_main() test_directories (test.test_unicode_file.TestUnicodeFiles) ... ERROR test_equivalent_files (test.test_unicode_file.TestUnicodeFiles) ... ERROR test_single_files (test.test_unicode_file.TestUnicodeFiles) ... ERROR ====================================================================== ERROR: test_directories (test.test_unicode_file.TestUnicodeFiles) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\apps\Python24\lib\test\test_unicode_file.py", line 178, in test_directories self._do_directory(TESTFN_ENCODED+ext, TESTFN_ENCODED+ext, True) File "C:\apps\Python24\lib\test\test_unicode_file.py", line 112, in _do_directory os.mkdir(make_name) OSError: [Errno 22] Invalid argument: '@test-??.dir' ====================================================================== ERROR: test_equivalent_files (test.test_unicode_file.TestUnicodeFiles) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\apps\Python24\lib\test\test_unicode_file.py", line 170, in test_equivalent_files self._test_equivalent(TESTFN_ENCODED, TESTFN_UNICODE) File "C:\apps\Python24\lib\test\test_unicode_file.py", line 154, in _test_equivalent f = file(filename1, "w") IOError: [Errno 2] No such file or directory: '@test-??' ====================================================================== ERROR: test_single_files (test.test_unicode_file.TestUnicodeFiles) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\apps\Python24\lib\test\test_unicode_file.py", line 164, in test_single_files self._test_single(TESTFN_ENCODED) File "C:\apps\Python24\lib\test\test_unicode_file.py", line 136, in _test_single f = file(filename, "w") IOError: [Errno 2] No such file or directory: '@test-??' ---------------------------------------------------------------------- Ran 3 tests in 0.061s FAILED (errors=3) Traceback (most recent call last): File "<pyshell#21>", line 1, in -toplevel- test_unicode_file.test_main() File "C:\apps\Python24\lib\test\test_unicode_file.py", line 191, in test_main run_suite(suite) File "C:\apps\Python24\lib\test\test_support.py", line 274, in run_suite raise TestFailed(msg) TestFailed: errors occurred; run in verbose mode for details >>> This is Python2.4a1 on win2k pro ---------------------------------------------------------------------- Comment By: George Yoshida (quiver) Date: 2005-01-28 06:16 Message: Logged In: YES user_id=671362 Can anyone merge this(test_unicode_file.py rev 1.16) to release23-maint branch? This is not specific to Python 2.4. ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2004-11-08 04:58 Message: Logged In: YES user_id=21627 This is now fixed in test_unicode_file.py 1.16. ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2004-11-07 19:12 Message: Logged In: YES user_id=21627 I'm talking about the third tab on XP regional settings; I don't know how the user interface looks in W2k. This tab says something like "language for programs which don't support Unicode". It might be that this setting is simply not available on W2k. ---------------------------------------------------------------------- Comment By: Grzegorz Makarewicz (makaron) Date: 2004-11-03 17:23 Message: Logged In: YES user_id=115179 Martin, on other w2k pro (english) sp4 with POLISH locale set this test works as expected - "All the Unicode tests appeared to work". Both versions have the same settings for regional options - polish: On first tab (general) I have Polish location and other languages on the same tab selected: western europe and US, central europe. On last tab (6 = input locales) I have polish programmers and endglish (US). Third tab - currency ? Or this test fails on non english versions of W2K ? German ? Hungarian ? ... ---------------------------------------------------------------------- Comment By: Grzegorz Makarewicz (makaron) Date: 2004-11-03 02:28 Message: Logged In: YES user_id=115179 same effect on non french w2k (polish locale), this persists on any python 2.x version and is rather independent from windows version - in my case it is w2k pro sp4. file created with this encoding works fine with windows commander - if that matters ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2004-10-15 15:14 Message: Logged In: YES user_id=21627 In control panel/regional settings, change the first *and* the third tab to English. This requires a reboot. The failure itself is harmless. test_support assumes that TESTFN_UNICODE = unicode("@test-\xe0\xf2", "latin-1") is a filename that can be represented in the default file encoding. On Windows, if the default file encoding is not CP-1252 (as it is in the Western European installations), this file name cannot be represented correctly in "mbcs". To fix this, we would need to come up with procedure to generate a file name depending on the locale. Unfortunately, such a procedure is very difficult to implement. ---------------------------------------------------------------------- Comment By: Miki Tebeka (tebeka) Date: 2004-10-14 17:59 Message: Logged In: YES user_id=358087 How do I switch my locale to English on winXP pro? ---------------------------------------------------------------------- Comment By: Anthony Baxter (anthonybaxter) Date: 2004-10-14 00:31 Message: Logged In: YES user_id=29957 Sounds like a locale thing - do the people seeing the bug have the problem if they switch their locale to english? ---------------------------------------------------------------------- Comment By: Marek Baczynski (imbaczek) Date: 2004-09-17 08:30 Message: Logged In: YES user_id=838849 I have the very same errors as quiver on WinXP SP1, Python 2.4a3, NTFS, locale Polish. ---------------------------------------------------------------------- Comment By: George Yoshida (quiver) Date: 2004-09-07 23:37 Message: Logged In: YES user_id=671362 I can reproduce this in Python 2.4a3 on Win 2K SP4(locale is set to Japanese). File system is NTFS. But on my box, test_single_files passes OK. Only test_equivalent_files and test_directories raise ERROR. Here is the result. test_unicode_file test_directories (test.test_unicode_file.TestUnicodeFiles) ... ERROR test_equivalent_files (test.test_unicode_file.TestUnicodeFiles) ... ERROR test_single_files (test.test_unicode_file.TestUnicodeFiles) ... ok ============================================== ======================== ERROR: test_directories (test.test_unicode_file.TestUnicodeFiles) ------------------------------------------------------------ ---------- Traceback (most recent call last): File "C:\Python24\lib\test\test_unicode_file.py", line 185, in test_directories self._do_directory(TESTFN_ENCODED+ext, TESTFN_UNICODE+ext, True) File "C:\Python24\lib\test\test_unicode_file.py", line 114, in _do_directory os.chdir(chdir_name) OSError: [Errno 2] No such file or directory: u'@test-\xe0 \xf2.dir' ============================================== ======================== ERROR: test_equivalent_files (test.test_unicode_file.TestUnicodeFiles) ------------------------------------------------------------ ---------- Traceback (most recent call last): File "C:\Python24\lib\test\test_unicode_file.py", line 176, in test_equivalent_files self._test_equivalent(TESTFN_ENCODED, TESTFN_UNICODE) File "C:\Python24\lib\test\test_unicode_file.py", line 157, in _test_equivalent self._do_equivilent(filename1, filename2) File "C:\Python24\lib\test\test_unicode_file.py", line 67, in _do_equivilent os.stat(filename2)) OSError: [Errno 2] No such file or directory: u'@test-\xe0\xf2' ------------------------------------------------------------ ---------- Ran 3 tests in 0.070s FAILED (errors=2) test test_unicode_file failed -- errors occurred; run in verbose mode for details 1 test failed: test_unicode_file ---------------------------------------------------------------------- Comment By: Miki Tebeka (tebeka) Date: 2004-09-07 15:56 Message: Logged In: YES user_id=358087 Yes it does :-( I have a winXP on IBM T-40. The other language that is installed is Hebrew. The problem that when encoding TESTFN_UNICODE with the file system ecoding (mbcs) the resulted string is "@test-??" which is not a legal file name on windows ---------------------------------------------------------------------- Comment By: Raymond Hettinger (rhettinger) Date: 2004-09-07 15:31 Message: Logged In: YES user_id=80475 Does this still fail for you in Py2.4a3 ? If not, please note the result and close the bug. ---------------------------------------------------------------------- Comment By: Miki Tebeka (tebeka) Date: 2004-07-18 15:44 Message: Logged In: YES user_id=358087 File system is NTFS. winver gives: Version 5.1 (Build 2600.xpsp2.030422-1633: Service Pack 1) ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2004-07-16 01:55 Message: Logged In: YES user_id=21627 Are you using a FAT partition? What precise version string do you get in winver.exe? ---------------------------------------------------------------------- Comment By: Miki Tebeka (tebeka) Date: 2004-07-13 15:10 Message: Logged In: YES user_id=358087 Sorry, I forgot I've upgraded my OS lately. This *is* WinXP Pro. Any other data I can send? ---------------------------------------------------------------------- Comment By: Tim Peters (tim_one) Date: 2004-07-13 01:35 Message: Logged In: YES user_id=31435 Peculiar -- it works fine on WinXP Pro, which ought to work the same as Win2K here. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=989338&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com