Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numexpr-2.4-rc1 test errors on Python 3 for Windows #141

Closed
cgohlke opened this issue Apr 6, 2014 · 3 comments
Closed

numexpr-2.4-rc1 test errors on Python 3 for Windows #141

cgohlke opened this issue Apr 6, 2014 · 3 comments

Comments

@cgohlke
Copy link
Contributor

cgohlke commented Apr 6, 2014

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Numexpr version:   2.4-rc1
NumPy version:     1.8.1
Python version:    3.3.5 (v3.3.5:62cf4e77f785, Mar  9 2014, 10:35:05) [MSC v.1600 64 bit (AMD64)]
AMD/Intel CPU?     True
VML available?     True
VML/MKL version:   Intel(R) Math Kernel Library Version 11.1.2 Product Build 20140122 for Intel(R) 64 architecture appli
cations
Number of threads used by default: 8 (out of 8 detected cores)
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
........EEEEEEEEE........EEEEEEEEE......................................................................................
<snip>
======================================================================
ERROR: test_str_contains_basic0 (numexpr.tests.test_numexpr.test_numexpr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 735, in evaluate
    compiled_ex = _numexpr_cache[numexpr_key]
KeyError: ('contains("abc", "ab")', (('optimization', 'aggressive'), ('truediv', False)), ())

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 166, in test_str_contains_basic0
    res = evaluate('contains("abc", "ab")')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 738, in evaluate
    NumExpr(ex, signature, **context)
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 554, in NumExpr
    precompile(ex, signature, context)
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 511, in precompile
    constants_order, constants = getConstants(ast)
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 294, in getConstants
    for a in constants_order]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 294, in <listcomp>
    for a in constants_order]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 284, in convertConstantToKind
    return kind_to_type[kind](x)
TypeError: string argument without an encoding

======================================================================
ERROR: test_str_contains_basic1 (numexpr.tests.test_numexpr.test_numexpr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 171, in test_str_contains_basic1
    res = evaluate('contains(haystack, "ab")')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str96

======================================================================
ERROR: test_str_contains_basic2 (numexpr.tests.test_numexpr.test_numexpr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 176, in test_str_contains_basic2
    res = evaluate('contains("abcd", haystack)')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str96

======================================================================
ERROR: test_str_contains_basic3 (numexpr.tests.test_numexpr.test_numexpr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 182, in test_str_contains_basic3
    res = evaluate('contains(haystacks, needles)')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str224

======================================================================
ERROR: test_str_contains_basic4 (numexpr.tests.test_numexpr.test_numexpr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 188, in test_str_contains_basic4
    res = evaluate('contains("test abc here", needles)')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str160

======================================================================
ERROR: test_str_contains_basic5 (numexpr.tests.test_numexpr.test_numexpr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 193, in test_str_contains_basic5
    res = evaluate('contains("test abc here", needles)')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str160

======================================================================
ERROR: test_str_contains_listproduct (numexpr.tests.test_numexpr.test_numexpr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 246, in test_str_contains_listproduct
    res = [bool(x) for x in evaluate('contains(b, a)')]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str192

======================================================================
ERROR: test_str_contains_withemptystr1 (numexpr.tests.test_numexpr.test_numexpr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 251, in test_str_contains_withemptystr1
    res = evaluate('contains("abcd", withemptystr)')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str96

======================================================================
ERROR: test_str_contains_withemptystr2 (numexpr.tests.test_numexpr.test_numexpr)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 256, in test_str_contains_withemptystr2
    res = evaluate('contains(withemptystr, "")')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str96

======================================================================
ERROR: test_str_contains_basic0 (numexpr.tests.test_numexpr.test_numexpr2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 735, in evaluate
    compiled_ex = _numexpr_cache[numexpr_key]
KeyError: ('contains("abc", "ab")', (('optimization', 'aggressive'), ('truediv', False)), ())

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 166, in test_str_contains_basic0
    res = evaluate('contains("abc", "ab")')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 738, in evaluate
    NumExpr(ex, signature, **context)
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 554, in NumExpr
    precompile(ex, signature, context)
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 511, in precompile
    constants_order, constants = getConstants(ast)
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 294, in getConstants
    for a in constants_order]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 294, in <listcomp>
    for a in constants_order]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 284, in convertConstantToKind
    return kind_to_type[kind](x)
TypeError: string argument without an encoding

======================================================================
ERROR: test_str_contains_basic1 (numexpr.tests.test_numexpr.test_numexpr2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 171, in test_str_contains_basic1
    res = evaluate('contains(haystack, "ab")')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str96

======================================================================
ERROR: test_str_contains_basic2 (numexpr.tests.test_numexpr.test_numexpr2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 176, in test_str_contains_basic2
    res = evaluate('contains("abcd", haystack)')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str96

======================================================================
ERROR: test_str_contains_basic3 (numexpr.tests.test_numexpr.test_numexpr2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 182, in test_str_contains_basic3
    res = evaluate('contains(haystacks, needles)')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str224

======================================================================
ERROR: test_str_contains_basic4 (numexpr.tests.test_numexpr.test_numexpr2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 188, in test_str_contains_basic4
    res = evaluate('contains("test abc here", needles)')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str160

======================================================================
ERROR: test_str_contains_basic5 (numexpr.tests.test_numexpr.test_numexpr2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 193, in test_str_contains_basic5
    res = evaluate('contains("test abc here", needles)')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str160

======================================================================
ERROR: test_str_contains_listproduct (numexpr.tests.test_numexpr.test_numexpr2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 246, in test_str_contains_listproduct
    res = [bool(x) for x in evaluate('contains(b, a)')]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str192

======================================================================
ERROR: test_str_contains_withemptystr1 (numexpr.tests.test_numexpr.test_numexpr2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 251, in test_str_contains_withemptystr1
    res = evaluate('contains("abcd", withemptystr)')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str96

======================================================================
ERROR: test_str_contains_withemptystr2 (numexpr.tests.test_numexpr.test_numexpr2)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "X:\Python33\lib\site-packages\numexpr\tests\test_numexpr.py", line 256, in test_str_contains_withemptystr2
    res = evaluate('contains(withemptystr, "")')
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in evaluate
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 730, in <listcomp>
    signature = [(name, getType(arg)) for (name, arg) in zip(names, arguments)]
  File "X:\Python33\lib\site-packages\numexpr\necompiler.py", line 629, in getType
    raise ValueError("unkown type %s" % a.dtype.name)
ValueError: unkown type str96

----------------------------------------------------------------------
Ran 5431 tests in 5.938s

FAILED (errors=18)
@FrancescAlted
Copy link
Contributor

Yeah, this is a general problem for Python 3, reproducible even in Unix platforms. @mrkafk could you please have a look into it?

@FrancescAlted
Copy link
Contributor

I think @mrkafk PR #135 only supports plain bytes strings, not unicode. Fixed the tests in rev e3ece75, but l will open a new ticket requesting for an enhancement for unicode.

@FrancescAlted
Copy link
Contributor

Added the new ticket in #142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants