Import error

Discussion in 'Module Connector (MC)' started by Daniel Robinson, May 7, 2019.

  1. Daniel Robinson

    Daniel Robinson New Member

    Hi,

    Having a problem with setting up on my new computer and migrating to 64 bit python, have the X4M200, got correct version of pymoduleconnector have run setup.py and have installed the packages I need however I am getting this error when running the 64 bit examples.

    Traceback (most recent call last):
    File "C:\Users\Robin\Desktop\ModuleConnector-win32_win64-1.6.2\python36-win64\pymoduleconnector\examples\X4M200_sleep_record.py", line 23, in <module>
    from pymoduleconnector import ModuleConnector
    File "C:\Users\Robin\AppData\Local\Programs\Python\Python37\lib\site-packages\pymoduleconnector-1.6.2-py3.7.egg\pymoduleconnector\__init__.py", line 2, in <module>
    from .moduleconnector import DataReader
    File "C:\Users\Robin\AppData\Local\Programs\Python\Python37\lib\site-packages\pymoduleconnector-1.6.2-py3.7.egg\pymoduleconnector\moduleconnector.py", line 5, in <module>
    from .moduleconnectorwrapper import \
    File "C:\Users\Robin\AppData\Local\Programs\Python\Python37\lib\site-packages\pymoduleconnector-1.6.2-py3.7.egg\pymoduleconnector\moduleconnectorwrapper\__init__.py", line 28, in <module>
    _moduleconnectorwrapper = swig_import_helper()
    File "C:\Users\Robin\AppData\Local\Programs\Python\Python37\lib\site-packages\pymoduleconnector-1.6.2-py3.7.egg\pymoduleconnector\moduleconnectorwrapper\__init__.py", line 24, in swig_import_helper
    _mod = imp.load_module('_moduleconnectorwrapper', fp, pathname, description)
    File "C:\Users\Robin\AppData\Local\Programs\Python\Python37\lib\imp.py", line 242, in load_module
    return load_dynamic(name, filename, file)
    File "C:\Users\Robin\AppData\Local\Programs\Python\Python37\lib\imp.py", line 342, in load_dynamic
    return _load(spec)
    ImportError: DLL load failed: The specified module could not be found.


    Best I can tell I think something is wrong with the path for the moduleconnector package but i'm not sure I believe that my python pathways are correct and even reinstalled everything with the same issue.

    Any ideas?

    Thanks,

    Daniel Robinson
     
    Last edited: May 7, 2019
  2. Daniel Robinson

    Daniel Robinson New Member

    Solved fixed python pathway to 3.6
     
    Charlie Shao likes this.
  3. piotr.grnia

    piotr.grnia New Member

    Hi, you can tell me how you did it because I have the same problem ?

    Thanks,
     
  4. Daniel Robinson

    Daniel Robinson New Member

    my pathways had not set properly for python so I completely uninstall every version of python and just downloaded the latest 3.6 version making sure to check the create PATH option during the process, worked after that.

    Have to redo setup.py as well with the clean install
     
    Charlie Shao likes this.