Uploaded image for project: 'WiredTiger'
  1. WiredTiger
  2. WT-5363

Error trying to use the Python library: no attribute SWIG_PyStaticMethod_New

    • Type: Icon: Improvement Improvement
    • Resolution: Community Answered
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Language Bindings
    • None

      I'm using Mojave with XCode 11.3 (Apple clang version 11.0.0 (clang-1100.0.33.16)).

      I tried installing the wiredtiger library from pip using Python 3.7.4 (and then 3.8.0 in a separate virtualenv) which appeared to be successful.

      However, the module fails to import with a SWIG error:

      File ".../Python.framework/Versions/3.7/lib/python3.7/site-packages/wiredtiger/_init_.py", line 36, in <module>
      _swig_new_static_method = _wiredtiger.SWIG_PyStaticMethod_New
      AttributeError: module 'wiredtiger._wiredtiger' has no attribute 'SWIG_PyStaticMethod_New'

      I tried building from source using SWIG 4.0.1:

      ./configure --enable-snappy --enable-lz4 --enable-zlib --enable-zstd --enable-python --with-builtins
      make
      make install

      This resulted in the same error when I tried to "import wiredtiger" in Python.

      WT-5159 was pointed out as a possible culprit, so I downgraded to SWIG 3.0.12 and did a "make clean" followed by the same steps to build and install from source.

      I still have the import error complaining about SWIG_PyStaticMethod_New.

      Any suggestions?

            Assignee:
            backlog-server-storage-engines [DO NOT USE] Backlog - Storage Engines Team
            Reporter:
            stephen.steneker@mongodb.com Stennie Steneker (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: