Fix for TypeError: _NamespacePath object is not reversible #700
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Most files in optiSLang are encrypted while shipping to pye. To handle imports in these files pye_loader is used. This lead to following error while reading the case file via encrypted python scripts in optiSLang environment:
inputs_table = InputParameters(session)
File "C:\Program Files\Dynardo\ANSYS optiSLang\2023 R1\lib\python3.7\lib\site-packages\ansys\fluent\parametric\parameters.py", line 140, in init
self._session.solver.root.setup.named_expressions, self.get_unit_label
File "C:\Program Files\Dynardo\ANSYS optiSLang\2023 R1\lib\python3.7\lib\site-packages\ansys\fluent\core\session.py", line 500, in root
self._settings_root = settings_get_root(flproxy=self._settings_service)
File "C:\Program Files\Dynardo\ANSYS optiSLang\2023 R1\lib\python3.7\lib\site-packages\ansys\fluent\core\solver\flobject.py", line 914, in get_root
from .ansys.fluent.core.solver import settings
File "", line 983, in _find_and_load
File "", line 963, in _find_and_load_unlocked
File "", line 902, in _find_spec
File "", line 876, in _find_spec_legacy
File "pye_loader.py", line 39, in find_module
TypeError: '_NamespacePath' object is not reversible
To handle this error, a blank init.py needs to be added to the ansys/core/solver directory