Skip to content

hash_geom=True forces to try using phidl even it is not installed #6

@shamil777

Description

@shamil777

While calling lytest.exe run myfile mytestfunc from command line
I have a following traceback:

'c:\users\botan\appdata\local\programs\python\python38\lib\site-packages\pya\init.py'>
Traceback (most recent call last):
File "C:\Users\botan\AppData\Local\Programs\Python\Python38\Scripts\lytest-script.py", line 33, in
sys.exit(load_entry_point('lytest==0.1.0', 'console_scripts', 'lytest')())
File "c:\users\botan\appdata\local\programs\python\python38\lib\site-packages\lytest\command_line.py", line 62, in cm_main
cm_xor_test(args.args)
File "c:\users\botan\appdata\local\programs\python\python38\lib\site-packages\lytest\command_line.py", line 116, in cm_xor_test
difftesting_function()
File ".\Projects\32QStairDisp\test_design.py", line 22, in test_design_shmest
difftest_it(design_total_draw)()
File "c:\users\botan\appdata\local\programs\python\python38\lib\site-packages\lytest\utest_buds.py", line 77, in wrapper
run_xor(ref_file, test_file, tolerance=1, hash_geom=True, verbose=False)

File "c:\users\botan\appdata\local\programs\python\python38\lib\site-packages\lytest\kdb_xor.py", line 163, in run_xor
run_xor_pya(*args, **kwargs)
File "c:\users\botan\appdata\local\programs\python\python38\lib\site-packages\lytest\kdb_xor.py", line 18, in run_xor_pya
run_xor_phidl(file1, file2, tolerance, hash_geom=True, verbose=verbose)
File "c:\users\botan\appdata\local\programs\python\python38\lib\site-packages\lytest\kdb_xor.py", line 140, in run_xor_phidl
TOP1, TOP2 = [import_oas(fn) for fn in [file1, file2]]
File "c:\users\botan\appdata\local\programs\python\python38\lib\site-packages\lytest\kdb_xor.py", line 140, in
File "c:\users\botan\appdata\local\programs\python\python38\lib\site-packages\lytest\phidl_oas.py", line 19, in import_oas
retval = pg.import_gds(filename, cellname=cellname, flatten=flatten)
File "c:\users\botan\appdata\local\programs\python\python38\lib\site-packages\lytest\phidl_oas.py", line 12, in __getattr__
raise ImportError('phidl was not found, so import/write OAS will not work')

My thoughts that problem resides here:

lytest/lytest/kdb_xor.py

Lines 15 to 17 in c7d2c10

if hash_geom or pya is None:
run_xor_phidl(file1, file2, tolerance, hash_geom=True, verbose=verbose)
return

while calling run_xor(ref_file, test_file, tolerance=1, hash_geom=True, verbose=False)
hash_geom=True forces to use phidl and trying to load .oas format though reference design is .gds
Furthermore, phidl is not installed in my particular case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions