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

There may be a bug #4

Open
EvgenieLebedev opened this issue Feb 28, 2024 · 0 comments
Open

There may be a bug #4

EvgenieLebedev opened this issue Feb 28, 2024 · 0 comments

Comments

@EvgenieLebedev
Copy link

EvgenieLebedev commented Feb 28, 2024

Dear developers!
I am a student and, as part of my work, I study the issues of modeling the gravitational field. For this reason, I am extremely interested in your project.
I am currently in the process of configuring your code and want to clarify why you are duplicating the path to Windows (make_windows_path_posix):
[Your code]

def make_windows_path_posix(file):
    # If the file was saved in Windows, but we are working on mac, download the mac path.
    if "C:\\" in the file and sys.platform.startswith("darwin"):
old_path = Clean path to Windows(file).as_posix()
more:
        old_path = file
    module_path = os.path.dirname(GravNN.__file__)
file = module_path + old_path.split("/GravNN")[-1]

    returns the file

Input: D:\GravNN-master\GravNN\GravNN\Files\ShapeModels\Eros\eros_shape_7790.obj
Output: d:\gravnn-master\gravnn\GravNND:\GravNN-master\GravNN\GravNN\Files\ShapeModels\Eros\eros_shape_7790.obj

Your code started when I made the correction:

def make_windows_path_posix(file):
    # If the file was deleted in Windows, but we are working on macOS or Linux
    if "C:\\" in the file and sys.platform.startswith("darwin"):
# Convert the path to POSIX format
        returning PureWindowsPath(file).as_posix()
more:
        # Returning the original path
        the returned file

If I misunderstood, then I apologize for distracting you.

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

No branches or pull requests

1 participant