iPlantCollaborativeOpenSource / Robotframework-MongoDB-Library

A library for interacting with MongoDB from RobotFramework
Other
33 stars 50 forks source link

ModuleNotFoundError: No module named 'mongo_connection_manager' #18

Open aimeejtix opened 6 years ago

aimeejtix commented 6 years ago

I recently tried to use this Library within my Robot Tests and I'm seeing this error:

[ ERROR ] Error in file '/sandbox/tradeix-tests/system_tests/common_steps/Common_Keywords.robot': Importing test library 'MongoDBLibrary' failed: ModuleNotFoundError: No module named 'mongo_connection_manager'
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/MongoDBLibrary/__init__.py", line 1, in <module>
    from mongo_connection_manager import MongoConnectionManager
PYTHONPATH:
  /usr/local/bin
  /usr/lib/python36.zip
  /usr/lib/python3.6
  /usr/lib/python3.6/lib-dynload
  /home/vagrant/.local/lib/python3.6/site-packages
  /usr/local/lib/python3.6/dist-packages
  /usr/local/lib/python3.6/dist-packages/tradeix_qa_lib-1.0.1-py3.6.egg
  /usr/local/lib/python3.6/dist-packages/robotframework_mongodblibrary-0.3.4-py3.6.egg
  /usr/lib/python3/dist-packages
  ..
  ..
  ..

I've also tried downloading the library and editing the paths to be relative to see if it helps, but still get errors. Any ideas why?

trifox commented 5 years ago

same here, another package with a similar error could be resolved using python class pathes e.g. in case of kafka-library the import using robot3 and python3 has to looks like this

Library robotframework_pykafka.robotframework_pykafka

instead of just the name - something concerning package namespace visibility in python is the guess here

PravinAlhat commented 4 years ago

Even I am getting the same error while running the test

[ ERROR ] Error in file '/Users/pravin.a/my-project/git/nuspire-rdo/test_suites/nuspire_testsuites/m01_Log_Ingest/ts01_log_ingest.robot' on line 3: Importing test library 'MongoDBLibrary' failed: ModuleNotFoundError: No module named 'mongo_connection_manager' Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/MongoDBLibrary/init.py", line 1, in from mongo_connection_manager import MongoConnectionManager PYTHONPATH: /Library/Frameworks/Python.framework/Versions/3.8/bin /Library/Frameworks/Python.framework/Versions/3.8/lib/python38.zip /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/lib-dynload /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages

robotframework-mongodblibrary=0.3.4 pymongo=3.10.1