Skip to content

Import error when running transactions Paying over 1000 dollars in fees #237

@blatherdrift

Description

@blatherdrift

System Information Ubuntu 16.04

BlockSci version: latest
Total memory: 64 gigs

Hello,

When I try to run the 'fees over $1000' example in Jupyter Notebook, I get an error message. Could someone please help me fix this? :)

"In file included from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16:0,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:82:34: warning: ‘int PyThread_create_key()’ is deprecated [-Wdeprecated-declarations]
     decltype(PyThread_create_key()) tstate = 0; // Usually an int but a long on Cygwin64 with Python 3.x
                                  ^
In file included from /usr/include/python3.7m/pystate.h:11:0,
                 from /usr/include/python3.7m/traceback.h:8,
                 from /usr/include/python3.7m/Python.h:109,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:111,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/usr/include/python3.7m/pythread.h:95:17: note: declared here
 PyAPI_FUNC(int) PyThread_create_key(void) Py_DEPRECATED(3.7);
                 ^~~~~~~~~~~~~~~~~~~
In file included from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16:0,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:82:34: warning: ‘int PyThread_create_key()’ is deprecated [-Wdeprecated-declarations]
     decltype(PyThread_create_key()) tstate = 0; // Usually an int but a long on Cygwin64 with Python 3.x
                                  ^
In file included from /usr/include/python3.7m/pystate.h:11:0,
                 from /usr/include/python3.7m/traceback.h:8,
                 from /usr/include/python3.7m/Python.h:109,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:111,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/usr/include/python3.7m/pythread.h:95:17: note: declared here
 PyAPI_FUNC(int) PyThread_create_key(void) Py_DEPRECATED(3.7);
                 ^~~~~~~~~~~~~~~~~~~
In file included from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16:0,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:169:53: warning: ‘int PyThread_create_key()’ is deprecated [-Wdeprecated-declarations]
         internals_ptr->tstate = PyThread_create_key();
                                                     ^
In file included from /usr/include/python3.7m/pystate.h:11:0,
                 from /usr/include/python3.7m/traceback.h:8,
                 from /usr/include/python3.7m/Python.h:109,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:111,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/usr/include/python3.7m/pythread.h:95:17: note: declared here
 PyAPI_FUNC(int) PyThread_create_key(void) Py_DEPRECATED(3.7);
                 ^~~~~~~~~~~~~~~~~~~
In file included from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:16:0,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/internals.h:170:61: warning: ‘int PyThread_set_key_value(int, void*)’ is deprecated [-Wdeprecated-declarations]
         PyThread_set_key_value(internals_ptr->tstate, tstate);
                                                             ^
In file included from /usr/include/python3.7m/pystate.h:11:0,
                 from /usr/include/python3.7m/traceback.h:8,
                 from /usr/include/python3.7m/Python.h:109,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:111,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/usr/include/python3.7m/pythread.h:97:17: note: declared here
 PyAPI_FUNC(int) PyThread_set_key_value(int key, void *value) Py_DEPRECATED(3.7);
                 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:0:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h: In constructor ‘pybind11::gil_scoped_acquire::gil_scoped_acquire()’:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:1739:75: warning: ‘void* PyThread_get_key_value(int)’ is deprecated [-Wdeprecated-declarations]
         tstate = (PyThreadState *) PyThread_get_key_value(internals.tstate);
                                                                           ^
In file included from /usr/include/python3.7m/pystate.h:11:0,
                 from /usr/include/python3.7m/traceback.h:8,
                 from /usr/include/python3.7m/Python.h:109,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:111,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/usr/include/python3.7m/pythread.h:98:20: note: declared here
 PyAPI_FUNC(void *) PyThread_get_key_value(int key) Py_DEPRECATED(3.7);
                    ^~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:0:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:1751:60: warning: ‘int PyThread_set_key_value(int, void*)’ is deprecated [-Wdeprecated-declarations]
             PyThread_set_key_value(internals.tstate, tstate);
                                                            ^
In file included from /usr/include/python3.7m/pystate.h:11:0,
                 from /usr/include/python3.7m/traceback.h:8,
                 from /usr/include/python3.7m/Python.h:109,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:111,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/usr/include/python3.7m/pythread.h:97:17: note: declared here
 PyAPI_FUNC(int) PyThread_set_key_value(int key, void *value) Py_DEPRECATED(3.7);
                 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:0:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h: In member function ‘void pybind11::gil_scoped_acquire::dec_ref()’:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:1790:69: warning: ‘void PyThread_delete_key_value(int)’ is deprecated [-Wdeprecated-declarations]
             PyThread_delete_key_value(detail::get_internals().tstate);
                                                                     ^
In file included from /usr/include/python3.7m/pystate.h:11:0,
                 from /usr/include/python3.7m/traceback.h:8,
                 from /usr/include/python3.7m/Python.h:109,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:111,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/usr/include/python3.7m/pythread.h:99:18: note: declared here
 PyAPI_FUNC(void) PyThread_delete_key_value(int key) Py_DEPRECATED(3.7);
                  ^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:0:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h: In constructor ‘pybind11::gil_scoped_release::gil_scoped_release(bool)’:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:1818:52: warning: ‘int PyThread_set_key_value(int, void*)’ is deprecated [-Wdeprecated-declarations]
                 PyThread_set_key_value(key, nullptr);
                                                    ^
In file included from /usr/include/python3.7m/pystate.h:11:0,
                 from /usr/include/python3.7m/traceback.h:8,
                 from /usr/include/python3.7m/Python.h:109,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:111,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/usr/include/python3.7m/pythread.h:97:17: note: declared here
 PyAPI_FUNC(int) PyThread_set_key_value(int key, void *value) Py_DEPRECATED(3.7);
                 ^~~~~~~~~~~~~~~~~~~~~~
In file included from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:0:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h: In destructor ‘pybind11::gil_scoped_release::~gil_scoped_release()’:
/home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:1831:47: warning: ‘int PyThread_set_key_value(int, void*)’ is deprecated [-Wdeprecated-declarations]
             PyThread_set_key_value(key, tstate);
                                               ^
In file included from /usr/include/python3.7m/pystate.h:11:0,
                 from /usr/include/python3.7m/traceback.h:8,
                 from /usr/include/python3.7m/Python.h:109,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/detail/common.h:111,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pytypes.h:12,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/cast.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/attr.h:13,
                 from /home/blocksci/BlockSci/blockscipy/blocksci/pybind11/include/pybind11/pybind11.h:43,
                 from /tmp/tmpg2hry1l8/dynamicCode0.cpp:2:
/usr/include/python3.7m/pythread.h:97:17: note: declared here
 PyAPI_FUNC(int) PyThread_set_key_value(int key, void *value) Py_DEPRECATED(3.7);
                 ^~~~~~~~~~~~~~~~~~~~~~


---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<timed exec> in <module>

~/BlockSci/blockscipy/blocksci/__init__.py in filter_tx(self, code, start, end)
    267             filled_template = template.safe_substitute({"module_name":module_name, "func_def" : code})
    268             makefile = self.create_makefile(module_name)
--> 269             func = self.build_function(filled_template, makefile, module_name)
    270             self.saved_tx_filters[code] = func
    271         return self.saved_tx_filters[code](self.chain, start, end)

~/BlockSci/blockscipy/blocksci/__init__.py in build_function(self, full_code, makefile, module_name)
    299         out, err = process.communicate()
    300         print(err.decode('utf8'))
--> 301         mod = importlib.import_module(module_name)
    302         return getattr(mod, "func")

/usr/lib/python3.6/importlib/__init__.py in import_module(name, package)
    124                 break
    125             level += 1
--> 126     return _bootstrap._gcd_import(name[level:], package, level)
    127 
    128 

/usr/lib/python3.6/importlib/_bootstrap.py in _gcd_import(name, package, level)

/usr/lib/python3.6/importlib/_bootstrap.py in _find_and_load(name, import_)

/usr/lib/python3.6/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

ModuleNotFoundError: No module named 'dynamicCode0'"'

I have importlib imported. Not sure why it says module not found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed-in-v0.6This issue has been resolved in the development version (available on the v0.6 branch)pythonIssue related to the Python interface

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions