Skip to content
This repository

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

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

4 participants

Jörgen Stenarson Thomas Kluyver Min RK Fernando Perez
Jörgen Stenarson
Collaborator

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)
Thomas Kluyver
Collaborator

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

Jörgen Stenarson
Collaborator
Min RK
Owner

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?

Thomas Kluyver
Collaborator

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.

Fernando Perez
Owner

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....

Thomas Kluyver
Collaborator

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

Jörgen Stenarson
Collaborator
Thomas Kluyver
Collaborator

Great.

Thomas Kluyver takluyver closed this November 30, 2011
Buravchik Buravchik referenced this issue in revolunet/sublimetext-google-apps-scripts February 12, 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
Something went wrong with that request. Please try again.