Open
Description
🔍 Before submitting the issue
- I have searched among the existing issues
- I am using a Python virtual environment
🐞 Description of the bug
upload_file is scanning the dir and uploading all of the individual files. It looks like it wasn't coded to handle dirs.
Here's the failure point
pyansys-geometry/src/ansys/geometry/core/modeler.py at main · ansys/pyansys-geometry

The loop just needs to skip dirs
📝 Steps to reproduce
Ensure the location the CATProduct is at has no folder in it
willnotopen = Path("C:\Assembly\Jet_Engine_Assembly", "Exhaust_Assembly.CATProduct")
design = modeler.open_file(willnotopen)
The model can open.
Now create a folder in the same location as the CATProduct and run the above code. You get an error about it wanting a file and not a directory.
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
261
🐍 Which Python version are you using?
3.10
📦 Installed packages
import os
import sys
import math
import numpy as np
from pint import Quantity
from pyvista.plotting import system_supports_plotting
from ansys.geometry.core import *
from ansys.geometry.core.connection import *
from ansys.geometry.core.designer import *
from ansys.geometry.core.materials import *
from ansys.geometry.core.math import *
from ansys.geometry.core.misc import *
from ansys.geometry.core.misc.units import UNITS
from ansys.geometry.core.plotting import *
from ansys.geometry.core.sketch import *
from ansys.geometry.core.designer.part import *
from ansys.geometry.core.designer.part import *
from ansys.geometry.core.misc import DEFAULT_UNITS, UNITS, Accuracy, Angle, Distance, checks
import pytest
from pathlib import Path