[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

error while importing a module

On Tuesday, 19 March 2019 08:34:25 UTC+5:30, Sharan Basappa  wrote:
> I have a design file that I am importing in a test file to run some tests.
> The design file compiles fine when I run it standalone but when I import it in the test file, I see error on the very first line where I am importing the design file.
> This is the line from test file:
> """
> test my design
> """
> import assertion_design as asd
> Here is the error:
> WindowsErrorTraceback (most recent call last)
> D:\Users\sharanb\OneDrive - HCL Technologies Ltd\Projects\MyBackup\Projects\Initiatives\machine learning\programs\assertion\assertion_design_test.py in <module>()
>       4 provided by the user
>       5 """
> ----> 6 import assertion_design as asd
> Am I missing something?


i think i figured it out.
The following 2 lines were missing before the import

import sys
sys.path.append('D:\Users\sharanb\OneDrive - HCL Technologies Ltd\Projects\MyBackup\Projects\Initiatives\machine learning\programs\assertion')