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

Fix for TypeError: _NamespacePath object is not reversible #700

Merged
merged 1 commit into from
Aug 10, 2022

Conversation

tejalprabhu01
Copy link
Collaborator

@tejalprabhu01 tejalprabhu01 commented Aug 10, 2022

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

@seanpearsonuk seanpearsonuk requested review from hpohekar and prmukherj and removed request for mkundu1 August 10, 2022 13:49
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

Successfully merging this pull request may close these issues.

4 participants