IPython.utils test error due to missing unicodedata module #1063

Closed
jstenar opened this Issue Nov 28, 2011 · 8 comments

Projects

None yet

4 participants

@jstenar
Member
jstenar commented Nov 28, 2011

I get the error below when running the testsuite on python2.6, windows 7, ipython master 65ac74e

It seems to be due to not being able to load unicodedata module. But I am able to import unicodedata at a regular ipython prompt.

In [1]: import unicodedata

In [2]: unicodedata.
unicodedata.UCD              unicodedata.decimal          unicodedata.lookup           unicodedata.numeric
unicodedata.bidirectional    unicodedata.decomposition    unicodedata.mirrored         unicodedata.ucd_3_2_0
unicodedata.category         unicodedata.digit            unicodedata.name             unicodedata.ucnhash_CAPI
unicodedata.combining        unicodedata.east_asian_width unicodedata.normalize        unicodedata.unidata_version

In [2]: unicodedata.

Testsuite error:

IPython test group: IPython.utils
..................................................................................SS..E.................................
.......................................................................
======================================================================
ERROR: Failure: SyntaxError ((unicode error) \N escapes not supported (can't load unicodedata module) (test_process.py,
line 70))
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\python26\lib\site-packages\nose\loader.py", line 390, in loadTestsFromName
    addr.filename, addr.module)
  File "c:\python26\lib\site-packages\nose\importer.py", line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "c:\python26\lib\site-packages\nose\importer.py", line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "c:\python\external\ipython\IPython\utils\tests\test_process.py", line 70
    [u'h\N{LATIN SMALL LETTER A WITH CARON}llo', [u'h\N{LATIN SMALL LETTER A WITH CARON}llo']],
SyntaxError: (unicode error) \N escapes not supported (can't load unicodedata module)
@takluyver
Member

If you just put in u'h\N{LATIN SMALL LETTER A WITH CARON}llo' at a plain Python prompt, does it succeed?

@jstenar
Member
jstenar commented Nov 28, 2011

Thomas skrev 2011-11-28 20:17:

If you just put in u'h\N{LATIN SMALL LETTER A WITH CARON}llo' at a plain Python prompt, does it succeed?


Reply to this email directly or view it on GitHub:
#1063 (comment)

Yes, I get:

u'h\N{LATIN SMALL LETTER A WITH CARON}llo'
u'h\u01cello'

@jstenar jstenar referenced this issue Nov 28, 2011
Merged

Win32 shlex #1064

@minrk
Member
minrk commented Nov 28, 2011

I've seen this before (only on Windows), and I have no idea why it happens. The unicodedata module is still fully functional, it's just that something weird happens in the test suite. The easiest fix is to just not use this particular kind of escape in tests. Is it somehow important that we do?

@takluyver
Member

Once the module has been parsed, it should make no difference at all. I imagine it was just for readability. I think just replacing it with \u01ce should be fine.

@fperez
Member
fperez commented Nov 29, 2011

I've made it high priority b/c I'd really like to put 0.12 out with a fully passing test suite on win32. We'll see if we can do it....

@takluyver
Member

@jstenar: This one can be closed now, right?

@jstenar
Member
jstenar commented Nov 30, 2011

Thomas skrev 2011-11-30 22:14:

@jstenar: This one can be closed now, right?


Reply to this email directly or view it on GitHub:
#1063 (comment)

yes

@takluyver
Member

Great.

@takluyver takluyver closed this Nov 30, 2011
@Buravchik Buravchik referenced this issue in revolunet/sublimetext-google-apps-scripts Feb 13, 2014
Open

Plugin does not work #7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment