Skip to content

Bump coverage from 7.5.0 to 7.5.1 (#395) #1191

Bump coverage from 7.5.0 to 7.5.1 (#395)

Bump coverage from 7.5.0 to 7.5.1 (#395) #1191

GitHub Actions / Test Report ubuntu-latest:3.12 failed May 13, 2024 in 0s

89 tests run, 75 passed, 5 skipped, 9 failed.

Annotations

Check failure on line 41 in tests/jms/test_algorithms.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.12

test_algorithms

ansys.hps.client.exceptions.APIError: 503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all
Raw output
client = <ansys.hps.client.client.Client object at 0x7f8dd6864f80>

    def test_algorithms(client):
    
        log.debug("=== Client ===")
        client = client
        jms_api = JmsApi(client)
        proj_name = f"rep_client_test_jms_AlgorithmsTest"
    
        proj = Project(name=proj_name, active=True)
>       proj = jms_api.create_project(proj, replace=True)

tests/jms/test_algorithms.py:41: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/jms_api.py:120: in create_project
    return create_project(self.client, self.url, project, replace, as_objects)
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/jms_api.py:334: in create_project
    r = client.session.post(f"{url}", data=json_data)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:637: in post
    return self.request("POST", url, data=data, json=json, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:710: in send
    r = dispatch_hook("response", hooks, r, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/hooks.py:30: in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response [503]>, args = ()
kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, ...}
r_content = {}, reason = 'Service Unavailable', description = None
error_msg = '503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all'

    def raise_for_status(response, *args, **kwargs):
        """Automatically checks HTTP errors.
    
        This method mimics the requests.Response.raise_for_status() method.
        """
        if 400 <= response.status_code < 600:
    
            r_content = {}
            try:
                r_content = response.json()
            except ValueError:
                pass
    
            reason = r_content.get("title", None)  # jms api
            if not reason:
                reason = r_content.get("error", None)  # auth api
            if not reason:
                reason = response.reason
    
            description = r_content.get("description", None)  # jms api
            if not description:
                description = r_content.get("error_description", None)  # auth api
    
            if 400 <= response.status_code < 500:
                error_msg = "%s Client Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
                raise ClientError(error_msg, reason=reason, description=description, response=response)
            elif 500 <= response.status_code < 600:
                error_msg = "%s Server Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
>               raise APIError(error_msg, reason=reason, description=description, response=response)
E               ansys.hps.client.exceptions.APIError: 503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all

.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/exceptions.py:108: APIError

Check failure on line 39 in tests/jms/test_files.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.12

test_files

ansys.hps.client.exceptions.APIError: 503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all
Raw output
client = <ansys.hps.client.client.Client object at 0x7f8dd6864f80>

    def test_files(client):
    
        jms_api = JmsApi(client)
>       proj = jms_api.create_project(
            Project(name=f"rep_client_test_jms_FilesTest", active=False), replace=True
        )

tests/jms/test_files.py:39: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/jms_api.py:120: in create_project
    return create_project(self.client, self.url, project, replace, as_objects)
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/jms_api.py:334: in create_project
    r = client.session.post(f"{url}", data=json_data)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:637: in post
    return self.request("POST", url, data=data, json=json, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:710: in send
    r = dispatch_hook("response", hooks, r, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/hooks.py:30: in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response [503]>, args = ()
kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, ...}
r_content = {}, reason = 'Service Unavailable', description = None
error_msg = '503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all'

    def raise_for_status(response, *args, **kwargs):
        """Automatically checks HTTP errors.
    
        This method mimics the requests.Response.raise_for_status() method.
        """
        if 400 <= response.status_code < 600:
    
            r_content = {}
            try:
                r_content = response.json()
            except ValueError:
                pass
    
            reason = r_content.get("title", None)  # jms api
            if not reason:
                reason = r_content.get("error", None)  # auth api
            if not reason:
                reason = response.reason
    
            description = r_content.get("description", None)  # jms api
            if not description:
                description = r_content.get("error_description", None)  # auth api
    
            if 400 <= response.status_code < 500:
                error_msg = "%s Client Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
                raise ClientError(error_msg, reason=reason, description=description, response=response)
            elif 500 <= response.status_code < 600:
                error_msg = "%s Server Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
>               raise APIError(error_msg, reason=reason, description=description, response=response)
E               ansys.hps.client.exceptions.APIError: 503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all

.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/exceptions.py:108: APIError

Check failure on line 137 in tests/jms/test_files.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.12

test_files.test_download_file_in_subdir

ansys.hps.client.exceptions.APIError: 503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all
Raw output
client = <ansys.hps.client.client.Client object at 0x7f8dd6864f80>

    def test_download_file_in_subdir(client):
    
        jms_api = JmsApi(client)
>       proj = jms_api.create_project(Project(name=f"rep_test_download_file_in_subdir", active=False))

tests/jms/test_files.py:137: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/jms_api.py:120: in create_project
    return create_project(self.client, self.url, project, replace, as_objects)
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/jms_api.py:334: in create_project
    r = client.session.post(f"{url}", data=json_data)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:637: in post
    return self.request("POST", url, data=data, json=json, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:710: in send
    r = dispatch_hook("response", hooks, r, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/hooks.py:30: in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response [503]>, args = ()
kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, ...}
r_content = {}, reason = 'Service Unavailable', description = None
error_msg = '503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all'

    def raise_for_status(response, *args, **kwargs):
        """Automatically checks HTTP errors.
    
        This method mimics the requests.Response.raise_for_status() method.
        """
        if 400 <= response.status_code < 600:
    
            r_content = {}
            try:
                r_content = response.json()
            except ValueError:
                pass
    
            reason = r_content.get("title", None)  # jms api
            if not reason:
                reason = r_content.get("error", None)  # auth api
            if not reason:
                reason = response.reason
    
            description = r_content.get("description", None)  # jms api
            if not description:
                description = r_content.get("error_description", None)  # auth api
    
            if 400 <= response.status_code < 500:
                error_msg = "%s Client Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
                raise ClientError(error_msg, reason=reason, description=description, response=response)
            elif 500 <= response.status_code < 600:
                error_msg = "%s Server Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
>               raise APIError(error_msg, reason=reason, description=description, response=response)
E               ansys.hps.client.exceptions.APIError: 503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all

.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/exceptions.py:108: APIError

Check failure on line 140 in tests/jms/test_fitness_definition.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.12

test_fitness_definition.test_fitness_definition_integration

ansys.hps.client.exceptions.APIError: 503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all
Raw output
client = <ansys.hps.client.client.Client object at 0x7f8dd6864f80>

    def test_fitness_definition_integration(client):
    
        proj_name = f"test_jms_FitnessDefinitionTest"
    
        proj = Project(name=proj_name, active=True)
        jms_api = JmsApi(client)
>       proj = jms_api.create_project(proj, replace=True)

tests/jms/test_fitness_definition.py:140: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/jms_api.py:120: in create_project
    return create_project(self.client, self.url, project, replace, as_objects)
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/jms_api.py:334: in create_project
    r = client.session.post(f"{url}", data=json_data)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:637: in post
    return self.request("POST", url, data=data, json=json, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:710: in send
    r = dispatch_hook("response", hooks, r, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/hooks.py:30: in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response [503]>, args = ()
kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, ...}
r_content = {}, reason = 'Service Unavailable', description = None
error_msg = '503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all'

    def raise_for_status(response, *args, **kwargs):
        """Automatically checks HTTP errors.
    
        This method mimics the requests.Response.raise_for_status() method.
        """
        if 400 <= response.status_code < 600:
    
            r_content = {}
            try:
                r_content = response.json()
            except ValueError:
                pass
    
            reason = r_content.get("title", None)  # jms api
            if not reason:
                reason = r_content.get("error", None)  # auth api
            if not reason:
                reason = response.reason
    
            description = r_content.get("description", None)  # jms api
            if not description:
                description = r_content.get("error_description", None)  # auth api
    
            if 400 <= response.status_code < 500:
                error_msg = "%s Client Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
                raise ClientError(error_msg, reason=reason, description=description, response=response)
            elif 500 <= response.status_code < 600:
                error_msg = "%s Server Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
>               raise APIError(error_msg, reason=reason, description=description, response=response)
E               ansys.hps.client.exceptions.APIError: 503 Server Error: Service Unavailable for: POST https://localhost:8443/hps/jms/api/v1/projects/?fields=all

.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/exceptions.py:108: APIError

Check failure on line 287 in tests/jms/test_projects.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.12

test_projects.test_copy_exec_script

ansys.hps.client.exceptions.APIError: 500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/mapdl-v241-exec_mapdl.py:copy?fields=all
Copying ansfs://default_execution_scripts/mapdl-v241-exec_mapdl.py failed
Raw output
client = <ansys.hps.client.client.Client object at 0x7f8dd6864f80>

    def test_copy_exec_script(client):
    
        jms_api = JmsApi(client)
        proj_name = f"test_copy_exec_script"
    
        proj = Project(name=proj_name)
        proj = jms_api.create_project(proj)
    
        project_api = ProjectApi(client, proj.id)
        ansys_short_version = f"v{ansys_version[2:4]}{ansys_version[6]}"
        script_name = f"mapdl-{ansys_short_version}-exec_mapdl"
>       file = project_api.copy_default_execution_script(f"{script_name}.py")

tests/jms/test_projects.py:287: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/project_api.py:564: in copy_default_execution_script
    checksum = _fs_copy_file(
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/project_api.py:803: in _fs_copy_file
    r = session.post(
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:637: in post
    return self.request("POST", url, data=data, json=json, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:710: in send
    r = dispatch_hook("response", hooks, r, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/hooks.py:30: in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response [500]>, args = ()
kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, ...}
r_content = {'description': 'Copying ansfs://default_execution_scripts/mapdl-v241-exec_mapdl.py failed', 'title': 'Copy failed'}
reason = 'Copy failed'
description = 'Copying ansfs://default_execution_scripts/mapdl-v241-exec_mapdl.py failed'
error_msg = '500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/mapdl-v241-exec_mapdl.py:copy?fields=all\nCopying ansfs://default_execution_scripts/mapdl-v241-exec_mapdl.py failed'

    def raise_for_status(response, *args, **kwargs):
        """Automatically checks HTTP errors.
    
        This method mimics the requests.Response.raise_for_status() method.
        """
        if 400 <= response.status_code < 600:
    
            r_content = {}
            try:
                r_content = response.json()
            except ValueError:
                pass
    
            reason = r_content.get("title", None)  # jms api
            if not reason:
                reason = r_content.get("error", None)  # auth api
            if not reason:
                reason = response.reason
    
            description = r_content.get("description", None)  # jms api
            if not description:
                description = r_content.get("error_description", None)  # auth api
    
            if 400 <= response.status_code < 500:
                error_msg = "%s Client Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
                raise ClientError(error_msg, reason=reason, description=description, response=response)
            elif 500 <= response.status_code < 600:
                error_msg = "%s Server Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
>               raise APIError(error_msg, reason=reason, description=description, response=response)
E               ansys.hps.client.exceptions.APIError: 500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/mapdl-v241-exec_mapdl.py:copy?fields=all
E               Copying ansfs://default_execution_scripts/mapdl-v241-exec_mapdl.py failed

.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/exceptions.py:108: APIError

Check failure on line 132 in tests/jms/test_task_definition_templates.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.12

test_task_definition_templates.test_template_integration

assert 0 > 0
 +  where 0 = len([])
Raw output
client = <ansys.hps.client.client.Client object at 0x7f8dd6864f80>

    def test_template_integration(client):
    
        jms_api = JmsApi(client)
    
        # Test get queries
        templates = jms_api.get_task_definition_templates()
>       assert len(templates) > 0
E       assert 0 > 0
E        +  where 0 = len([])

tests/jms/test_task_definition_templates.py:132: AssertionError

Check failure on line 193 in tests/test_examples.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.12

test_examples.test_fluent_2d_heat_exchanger_with_exec_script

ansys.hps.client.exceptions.APIError: 500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/fluent-v241-exec_fluent.py:copy?fields=all
Copying ansfs://default_execution_scripts/fluent-v241-exec_fluent.py failed
Raw output
client = <ansys.hps.client.client.Client object at 0x7f8dd6864f80>

    def test_fluent_2d_heat_exchanger_with_exec_script(client):
    
        from examples.fluent_2d_heat_exchanger.project_setup import create_project
    
>       project = create_project(
            client, name="Fluent test (exec script)", version=ansys_version, use_exec_script=True
        )

tests/test_examples.py:193: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
examples/fluent_2d_heat_exchanger/project_setup.py:121: in create_project
    exec_script_file = project_api.copy_default_execution_script(
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/project_api.py:564: in copy_default_execution_script
    checksum = _fs_copy_file(
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/project_api.py:803: in _fs_copy_file
    r = session.post(
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:637: in post
    return self.request("POST", url, data=data, json=json, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:710: in send
    r = dispatch_hook("response", hooks, r, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/hooks.py:30: in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response [500]>, args = ()
kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, ...}
r_content = {'description': 'Copying ansfs://default_execution_scripts/fluent-v241-exec_fluent.py failed', 'title': 'Copy failed'}
reason = 'Copy failed'
description = 'Copying ansfs://default_execution_scripts/fluent-v241-exec_fluent.py failed'
error_msg = '500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/fluent-v241-exec_fluent.py:copy?fields=all\nCopying ansfs://default_execution_scripts/fluent-v241-exec_fluent.py failed'

    def raise_for_status(response, *args, **kwargs):
        """Automatically checks HTTP errors.
    
        This method mimics the requests.Response.raise_for_status() method.
        """
        if 400 <= response.status_code < 600:
    
            r_content = {}
            try:
                r_content = response.json()
            except ValueError:
                pass
    
            reason = r_content.get("title", None)  # jms api
            if not reason:
                reason = r_content.get("error", None)  # auth api
            if not reason:
                reason = response.reason
    
            description = r_content.get("description", None)  # jms api
            if not description:
                description = r_content.get("error_description", None)  # auth api
    
            if 400 <= response.status_code < 500:
                error_msg = "%s Client Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
                raise ClientError(error_msg, reason=reason, description=description, response=response)
            elif 500 <= response.status_code < 600:
                error_msg = "%s Server Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
>               raise APIError(error_msg, reason=reason, description=description, response=response)
E               ansys.hps.client.exceptions.APIError: 500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/fluent-v241-exec_fluent.py:copy?fields=all
E               Copying ansfs://default_execution_scripts/fluent-v241-exec_fluent.py failed

.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/exceptions.py:108: APIError

Check failure on line 211 in tests/test_examples.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.12

test_examples.test_fluent_nozzle

ansys.hps.client.exceptions.APIError: 500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/fluent-v241-exec_fluent.py:copy?fields=all
Copying ansfs://default_execution_scripts/fluent-v241-exec_fluent.py failed
Raw output
client = <ansys.hps.client.client.Client object at 0x7f8dd6864f80>

    def test_fluent_nozzle(client):
    
        from examples.fluent_nozzle.project_setup import create_project
    
>       project = create_project(client, name="Fluent nozzle test", num_jobs=1, version=ansys_version)

tests/test_examples.py:211: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
examples/fluent_nozzle/project_setup.py:131: in create_project
    exec_script_file = project_api.copy_default_execution_script(
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/project_api.py:564: in copy_default_execution_script
    checksum = _fs_copy_file(
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/project_api.py:803: in _fs_copy_file
    r = session.post(
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:637: in post
    return self.request("POST", url, data=data, json=json, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:710: in send
    r = dispatch_hook("response", hooks, r, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/hooks.py:30: in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response [500]>, args = ()
kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, ...}
r_content = {'description': 'Copying ansfs://default_execution_scripts/fluent-v241-exec_fluent.py failed', 'title': 'Copy failed'}
reason = 'Copy failed'
description = 'Copying ansfs://default_execution_scripts/fluent-v241-exec_fluent.py failed'
error_msg = '500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/fluent-v241-exec_fluent.py:copy?fields=all\nCopying ansfs://default_execution_scripts/fluent-v241-exec_fluent.py failed'

    def raise_for_status(response, *args, **kwargs):
        """Automatically checks HTTP errors.
    
        This method mimics the requests.Response.raise_for_status() method.
        """
        if 400 <= response.status_code < 600:
    
            r_content = {}
            try:
                r_content = response.json()
            except ValueError:
                pass
    
            reason = r_content.get("title", None)  # jms api
            if not reason:
                reason = r_content.get("error", None)  # auth api
            if not reason:
                reason = response.reason
    
            description = r_content.get("description", None)  # jms api
            if not description:
                description = r_content.get("error_description", None)  # auth api
    
            if 400 <= response.status_code < 500:
                error_msg = "%s Client Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
                raise ClientError(error_msg, reason=reason, description=description, response=response)
            elif 500 <= response.status_code < 600:
                error_msg = "%s Server Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
>               raise APIError(error_msg, reason=reason, description=description, response=response)
E               ansys.hps.client.exceptions.APIError: 500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/fluent-v241-exec_fluent.py:copy?fields=all
E               Copying ansfs://default_execution_scripts/fluent-v241-exec_fluent.py failed

.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/exceptions.py:108: APIError

Check failure on line 246 in tests/test_examples.py

See this annotation in the file changed.

@github-actions github-actions / Test Report ubuntu-latest:3.12

test_examples.test_lsdyna_cylinder_plate_with_exec_script

ansys.hps.client.exceptions.APIError: 500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/lsdyna-v241-exec_lsdyna.py:copy?fields=all
Copying ansfs://default_execution_scripts/lsdyna-v241-exec_lsdyna.py failed
Raw output
client = <ansys.hps.client.client.Client object at 0x7f8dd6864f80>

    def test_lsdyna_cylinder_plate_with_exec_script(client):
    
        from examples.lsdyna_cylinder_plate.lsdyna_job import submit_job
    
>       app_job = submit_job(client, name="LS-DYNA Cylinder Plate", version=ansys_version)

tests/test_examples.py:246: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
examples/lsdyna_cylinder_plate/lsdyna_job.py:229: in submit_job
    exec_script_file = project_api.copy_default_execution_script(
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/project_api.py:564: in copy_default_execution_script
    checksum = _fs_copy_file(
.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/jms/api/project_api.py:803: in _fs_copy_file
    r = session.post(
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:637: in post
    return self.request("POST", url, data=data, json=json, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:589: in request
    resp = self.send(prep, **send_kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/sessions.py:710: in send
    r = dispatch_hook("response", hooks, r, **kwargs)
.tox/py312-coverage/lib/python3.12/site-packages/requests/hooks.py:30: in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

response = <Response [500]>, args = ()
kwargs = {'cert': None, 'proxies': OrderedDict(), 'stream': False, 'timeout': None, ...}
r_content = {'description': 'Copying ansfs://default_execution_scripts/lsdyna-v241-exec_lsdyna.py failed', 'title': 'Copy failed'}
reason = 'Copy failed'
description = 'Copying ansfs://default_execution_scripts/lsdyna-v241-exec_lsdyna.py failed'
error_msg = '500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/lsdyna-v241-exec_lsdyna.py:copy?fields=all\nCopying ansfs://default_execution_scripts/lsdyna-v241-exec_lsdyna.py failed'

    def raise_for_status(response, *args, **kwargs):
        """Automatically checks HTTP errors.
    
        This method mimics the requests.Response.raise_for_status() method.
        """
        if 400 <= response.status_code < 600:
    
            r_content = {}
            try:
                r_content = response.json()
            except ValueError:
                pass
    
            reason = r_content.get("title", None)  # jms api
            if not reason:
                reason = r_content.get("error", None)  # auth api
            if not reason:
                reason = response.reason
    
            description = r_content.get("description", None)  # jms api
            if not description:
                description = r_content.get("error_description", None)  # auth api
    
            if 400 <= response.status_code < 500:
                error_msg = "%s Client Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
                raise ClientError(error_msg, reason=reason, description=description, response=response)
            elif 500 <= response.status_code < 600:
                error_msg = "%s Server Error: %s for: %s %s" % (
                    response.status_code,
                    reason,
                    response.request.method,
                    response.url,
                )
                if description:
                    error_msg += f"\n{description}"
>               raise APIError(error_msg, reason=reason, description=description, response=response)
E               ansys.hps.client.exceptions.APIError: 500 Server Error: Copy failed for: POST https://localhost:8443/hps/fs/api/v1/default_execution_scripts/lsdyna-v241-exec_lsdyna.py:copy?fields=all
E               Copying ansfs://default_execution_scripts/lsdyna-v241-exec_lsdyna.py failed

.tox/py312-coverage/lib/python3.12/site-packages/ansys/hps/client/exceptions.py:108: APIError