amruthvvkp / flaui-uiautomation-wrapper

Tool to perform UI Automation on Windows desktop applications using an underlying Fla-UI wrapper.
GNU General Public License v3.0
6 stars 3 forks source link

Fix "ModuleNotFoundError: No module named 'config'" error. #58

Closed amruthvvkp closed 1 year ago

amruthvvkp commented 1 year ago

Recent release v1.0.0 introduced a bug that causes the following error when running the script:

from flaui.lib.pythonnet_bridge import setup_pythonnet_bridge

setup_pythonnet_bridge()

It throws the following error:

(flaui-wrapper-test-py3.10) PS C:\Users\***> & C:/Users/***/AppData/Local/pypoetry/Cache/virtualenvs/flaui-wrapper-test-AYogNOoy-py3.10/Scripts/python.exe c:/Users/***/AppData/Local/Temp/Tempb0079d5c-8d15-4879-9f8d-0439c63bb7ea_tests_wrapper_main-20231010T093921Z-001.zip/tests_wrapper_main/test.py
Traceback (most recent call last):
  File "c:\Users\***\AppData\Local\Temp\Tempb0079d5c-8d15-4879-9f8d-0439c63bb7ea_tests_wrapper_main-20231010T093921Z-001.zip\tests_wrapper_main\test.py", line 1, in <module>
    from flaui.lib.pythonnet_bridge import  test_setup_pythonnet_bridge
  File "C:\Users\***\AppData\Local\pypoetry\Cache\virtualenvs\flaui-wrapper-test-AYogNOoy-py3.10\lib\site-packages\flaui\lib\pythonnet_bridge.py", line 4, in <module>
    import config
ModuleNotFoundError: No module named 'config'

This is caused by the Poetry configuration lsited in pyproject.toml. It needs to include the config.py file in the flaui package.