Skip to content

SE.LoadFile(...) fails to open ephemeris file despite successful swi_fopen override #48

@Langer75

Description

@Langer75

Hi Yanos,

I’m currently using SwissEphNet on a Linux-based .NET 8 project (Raspberry Pi), and encountering a persistent issue with loading Chiron (SE_CHIRON) using Swiss Ephemeris .se1 files.

I’ve successfully implemented a swi_fopen() override. The debug log confirms it is called correctly and returns the correct absolute path to seas_18.se1. The file:

  • is located at /home/pi/ephe/seas_18.se1
  • exists and is readable (File.Exists(...) == true)
  • can be manually opened via FileStream without issue
  • begins with SWISSEPH 1 in the header, matching known valid .se1 files

However, SE.LoadFile(fnamp) still returns null, and swe_calc(...) fails with the error:

SwissEph file 'seas_18.se1' not found in PATH '/home/pi/ephe'

All signs suggest that the file is rejected somewhere deeper in the native logic or interop layer — perhaps due to encoding, file handle treatment, or assumptions in the C-port mapping.

I’d be very grateful for any insight into what internal conditions LoadFile(...) checks beyond file existence, or whether this might be a known limitation in the current port.

Thanks in advance for your time and for maintaining this great library!

Best regards,
Andreas

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