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

Windows Compatibility Issues with Example Scripts and Setup #65

Open
aaryan182 opened this issue Feb 1, 2025 · 0 comments · May be fixed by #68
Open

Windows Compatibility Issues with Example Scripts and Setup #65

aaryan182 opened this issue Feb 1, 2025 · 0 comments · May be fixed by #68

Comments

@aaryan182
Copy link

Describe the bug
Running Preswald on Windows encounters multiple issues:

  1. FileNotFoundError when running example scripts (e.g., examples/earthquakes/hello.py)
  2. Path resolution issues with __file__ variable in Windows environment
  3. Data file path resolution failing on Windows-style paths

Steps to Reproduce

  1. Install Preswald on Windows:

    git clone https://github.com/StructuredLabs/preswald.git
    cd preswald
  2. Try to run the earthquake example:

    preswald run examples/earthquakes/hello.py
  3. Observe errors:

    Running 'hello.py' on http://localhost:8501 with log level INFO  🎉!
    Starting Preswald server at http://localhost:8501
    Will run script: /preswald/examples/earthquakes/hello.py
    INFO:     Started server process [487]
    INFO:     Waiting for application startup.
    INFO:     Application startup complete.
    INFO:     Uvicorn running on http://0.0.0.0:8501
    FileNotFoundError: [Errno 2] No such file or directory: 'data/earthquake_data.csv'
    

Expected behavior

  • Example scripts should run without path-related errors on Windows
  • File paths should be properly resolved regardless of OS
  • Data files should be found using relative paths from the script location

Environment

  • OS: Windows 11
  • Python version: 3.x
  • Shell: Git Bash/PowerShell/CMD

Additional context
The issues appear to be related to:

  • Windows path separator differences (\ vs /)
  • Path resolution in Windows environment
  • Relative path handling in different shells on Windows
@TaejusYee2001 TaejusYee2001 linked a pull request Feb 3, 2025 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant