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

pywin32 package did not install with windows platform for idmtools_test #2216

Closed
shchen-idmod opened this issue Mar 26, 2024 · 1 comment
Closed
Labels
bug Something isn't working Core Test

Comments

@shchen-idmod
Copy link
Collaborator

We added to core's setup.py with win32 condation. But there is bug in code.
Beside we should add pywin32 to setup.py in idmtools_test package

idmtools_test\idmtools_test\utils\execute_operations\simulate_operations.py:192: in send_assets
    self._copy_or_link_parent_assets(exp_path, sim_path, simulation)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

exp_path = 'C:\\github\\idmtools\\idmtools_core\\tests\\.test_platform\\Experiment000000\\Assets', sim_path = 'C:\\github\\idmtools\\idmtools_core\\tests\\.test_platform\\Experiment000000\\Simulation000000', simulation = <Simulation: Simulation000000 - Exp_id: Experiment000000>

    @staticmethod
    def _copy_or_link_parent_assets(exp_path: str, sim_path: str, simulation: Simulation):
        """
        Link or Copy a simulation parent assets into its directory

        Args:
            exp_path: Path to experiment assets
            sim_path: Simulation path
            simulation: Simulation

        Returns:

        """
        for asset in simulation.parent.assets:
            remote_path = Path(exp_path).joinpath(asset.relative_path) if asset.relative_path else Path(exp_path)
            sim_assets = Path(sim_path).joinpath("Assets")
            src_path = remote_path.joinpath(asset.filename)
            dest_path = sim_assets.joinpath(asset.filename)
            sim_assets.mkdir(parents=True, exist_ok=True)
            if sys.platform in ['win32']:
>               import win32file
E               ModuleNotFoundError: No module named 'win32file'

..\..\idmtools_test\idmtools_test\utils\execute_operations\simulate_operations.py:228: ModuleNotFoundError
@shchen-idmod
Copy link
Collaborator Author

Fixed in 1.7.10 release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Core Test
Projects
None yet
Development

No branches or pull requests

1 participant