Snippets

Kamal Ahmed AttributeError: 'module' object has no attribute 'array'

Created by Kamal Ahmed
python argfileparser.py --conf t.txt --name 'Mark'
Traceback (most recent call last):
  File "argfileparser.py", line 3, in <module>
    import yaml
  File "/Library/Python/2.7/site-packages/yaml/__init__.py", line 8, in <module>
    from loader import *
  File "/Library/Python/2.7/site-packages/yaml/loader.py", line 4, in <module>
    from reader import *
  File "/Library/Python/2.7/site-packages/yaml/reader.py", line 45, in <module>
    class Reader(object):
  File "/Library/Python/2.7/site-packages/yaml/reader.py", line 137, in Reader
    NON_PRINTABLE = re.compile(u'[^\x09\x0A\x0D\x20-\x7E\x85\xA0-\uD7FF\uE000-\uFFFD]')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 194, in compile
    return _compile(pattern, flags)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", line 249, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.py", line 576, in compile
    code = _code(p, flags)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.py", line 558, in _code
    _compile_info(code, p, flags)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.py", line 536, in _compile_info
    _compile_charset(charset, flags, code)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.py", line 232, in _compile_charset
    flags & SRE_FLAG_UNICODE):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.py", line 386, in _optimize_charset
    data[0:0] = [block] + _bytes_to_codes(mapping)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/sre_compile.py", line 423, in _bytes_to_codes
    a = array.array(code, bytes(b))
AttributeError: 'module' object has no attribute 'array'

Comments (0)

HTTPS SSH

You can clone a snippet to your computer for local editing. Learn more.