Skip to content

There may be a bug #4

@EvgenieLebedev

Description

@EvgenieLebedev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions