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

Directory separator is os-dependent ('/' vs. '\', css_file) #61

Open
Sogolumbo opened this issue Jul 15, 2022 · 1 comment
Open

Directory separator is os-dependent ('/' vs. '\', css_file) #61

Sogolumbo opened this issue Jul 15, 2022 · 1 comment

Comments

@Sogolumbo
Copy link

The path to the css file may have to be interpreted by a browser on a windows machine. The hardcoded / characters here cause an error:
The css file can not be found.

Replacing the line with the following code works on Windows:

css_file = "file:///" + os.path.join(plugin_path, "static", "seo_report.css")
@Sogolumbo Sogolumbo changed the title css_file always uses '/' but '\' is also possible Directory separator is os-dependent ('/' vs. '\', css_file) Jul 15, 2022
@MaevaBrunelles
Copy link
Collaborator

Indeed. I suppose that the fix you propose couldn't work on Unix with "file:///". I need some time to do some tests.

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

No branches or pull requests

2 participants