Skip to content

Skip non-directory entries in cleanUp results folder#8

Open
SeaCelo wants to merge 1 commit intoOSeMOSYS:masterfrom
SeaCelo:fix-cleanup-dsstore
Open

Skip non-directory entries in cleanUp results folder#8
SeaCelo wants to merge 1 commit intoOSeMOSYS:masterfrom
SeaCelo:fix-cleanup-dsstore

Conversation

@SeaCelo
Copy link

@SeaCelo SeaCelo commented Feb 3, 2026

Fixes #7

  • Skip non-directory entries when iterating over the results folder during cleanUp(). Not an issue on Windows but a good patch to prevent errors on any future platforms.

Why

  • On macOS, Finder creates .DS_Store files in folders.
  • cleanUp() assumes every entry in res/ is a directory and crashes with NotADirectoryError when it hits .DS_Store.
  • This guard avoids the error without changing any behavior on other platforms.

Testing

  • Clicked CLEAN UP on macOS; no 500 error.

parthdagia05 pushed a commit to parthdagia05/MUIO that referenced this pull request Feb 25, 2026
…m fixes

- Config.py: anchor all paths to PROJECT_ROOT via __file__ (CWD-independent)
- app.py: use Config.WebAPP_PATH for template/static dirs, clean startup banner
- OsemosysClass.py: 3-tier solver resolution (env var → PATH → bundled fallback)
- SyncS3.py + UploadRoute.py: replace hardcoded backslash with os.sep
- SyncS3.py + UploadRoute.py: guard against None in S3 list_objects_v2
- CustomThreadClass.py: propagate exceptions from background threads
- Base.Class.js: use window.location.origin for API URL resolution
- Osemosys.Class.js: guard null casename in getData/getResultData
- index.html: comment out missing wijmo licence.js
- Config.py: fix EmissionActivityRatio typo ('e''t' → 'e','t')
- setup.sh: cross-platform setup script (venv, deps, GLPK/CBC via Homebrew)

Closes OSeMOSYS#3, OSeMOSYS#8, OSeMOSYS#12, OSeMOSYS#25, OSeMOSYS#34, OSeMOSYS#39, #43, #45
Supersedes PRs: OSeMOSYS#11, OSeMOSYS#13, OSeMOSYS#28, OSeMOSYS#31, OSeMOSYS#32, OSeMOSYS#35, OSeMOSYS#40, #44, #46
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 this pull request may close these issues.

CLEAN UP fails on macOS due to .DS_Store in res folder

1 participant