i have written a custom Library in python, which imports a package named "asammdf". But, when i import my custom Library in Robot code, it shows error in importing "asammdf" in python. It says: "Error in File *.robot. Importing test Library *.py failed. Import Error: DLL load failed: the specified module could not be found."
"asammdf" package is available in one of the PYTHONPATH it mentions during executions.
Can someone please help me doing this and let me know, what have i done wrong? My python File (trialRobot.py):
import asammdf
...
...
...
My robot file (TC1.robot):
*** Settings ***
Library trialRobot.py
*** Test Cases ***
TC1
DO THIS
DO THAT
The error it shows is:
[ ERROR ] Error in file 'G:\AutomationRobotFramework\RobotAutomationFramework\TC1.robot': Im
porting test library 'G:\AutomationRobotFramework\RobotAutomationFramework\trialRobot.py' fa
iled: ImportError: DLL load failed: The specified module could not be found.
Traceback (most recent call last):
File "G:\AutomationRobotFramework\RobotAutomationFramework\trialRobot.py", line 1, in <mod
ule>
import asammdf
File "g:\automationrobotframework\venv\lib\site-packages\asammdf\__init__.py", line 15, in
<module>
from .blocks.mdf_v2 import MDF2
File "g:\automationrobotframework\venv\lib\site-packages\asammdf\blocks\mdf_v2.py", line 4
, in <module>
from .mdf_v3 import MDF3
File "g:\automationrobotframework\venv\lib\site-packages\asammdf\blocks\mdf_v3.py", line 4
4, in <module>
from ..signal import Signal
File "g:\automationrobotframework\venv\lib\site-packages\asammdf\signal.py", line 9, in <m
odule>
from .blocks.utils import MdfException, extract_cncomment_xml, SignalSource
File "g:\automationrobotframework\venv\lib\site-packages\asammdf\blocks\utils.py", line 27
, in <module>
from cchardet import detect
File "g:\automationrobotframework\venv\lib\site-packages\cchardet\__init__.py", line 1, in
<module>
from cchardet import _cchardet
PYTHONPATH:
G:\AutomationRobotFramework\venv\Scripts\robot.exe
C:\Program Files\Python37\python37.zip
C:\Program Files\Python37\DLLs
C:\Program Files\Python37\lib
C:\Program Files\Python37
g:\automationrobotframework\venv
g:\automationrobotframework\venv\lib\site-packages
g:\automationrobotframework\venv\lib\site-packages\pip-19.0.3-py3.7.egg
But, the asammdf package is installed in python using pip without any name or location conflict. It is installed only once and in the folder, where pip installs by default. Thanks in advance.
You need to install cchardet 2.1.5