Skip to content

fix: avoid crash caused by os.path.abspath in Windows#157

Open
ayushkr12 wants to merge 1 commit into
GerbenJavado:masterfrom
ayushkr12:master
Open

fix: avoid crash caused by os.path.abspath in Windows#157
ayushkr12 wants to merge 1 commit into
GerbenJavado:masterfrom
ayushkr12:master

Conversation

@ayushkr12

@ayushkr12 ayushkr12 commented Apr 13, 2025

Copy link
Copy Markdown

Fixes a bug where the script crashes on Windows when trying to save output.html. You get the [WinError 1] Incorrect function error, especially with paths with spaces.

What Changed:

  • Added a try-except around os.path.abspath(args.output) to stop the crash.
  • If it fails, you get a proper error message instead of the script dying.

Windows users couldn’t use -o or simply output if their current directory path include spaces because of this issue. Fixed that.

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.

1 participant