Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config.py expand_path unexpected behavior #43

Open
dougransom opened this issue Dec 31, 2022 · 0 comments
Open

config.py expand_path unexpected behavior #43

dougransom opened this issue Dec 31, 2022 · 0 comments
Assignees

Comments

@dougransom
Copy link
Member

in repot https://github.com/dougransom/natlinkcore/tree/nc_tests_tweak/src/natlinkcore

I added

except Exception as e:
        print(f"{__file__} Exception {e} ignored in expand_path{input_path}")

catching

C:\Users\doug\code\dt\natlinkcore\src\natlinkcore\config.py Exception PureWindowsPath('C:') has an empty name ignored in expand_pathC:\Users\doug\code\dt\unimacro\tests\unimacro_test_natlink_config.natlink

Not sure why that is being thrown, but not catching exceptions here seems to cause issues.

I would propose a keyword argument to expand path, attempt_load=True which will only try the import trick if it is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants