Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
jstenar opened this Issue · 8 comments

4 participants

@jstenar
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)
@takluyver
Owner

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

@jstenar
Collaborator
@jstenar jstenar referenced this issue
Merged

Win32 shlex #1064

@minrk
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?

@takluyver
Owner

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

@takluyver
Owner

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

@jstenar
Collaborator
@takluyver
Owner

Great.

@takluyver takluyver closed this
@Buravchik Buravchik referenced this issue in revolunet/sublimetext-google-apps-scripts
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.