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

convert_page fails on windows if page_path contains drive letter #10

Open
hdkire opened this issue Apr 11, 2019 · 0 comments
Open

convert_page fails on windows if page_path contains drive letter #10

hdkire opened this issue Apr 11, 2019 · 0 comments

Comments

@hdkire
Copy link

hdkire commented Apr 11, 2019

convert_page fails on windows when called with paths containing drive letter as page_path because it treats the drive letter of a windows path as an url scheme.

Env:

Python 3.7.2
Windows 10

Repro:

import htmlark
htmlark.convert_page('C:\\page.html')

=>

Traceback (most recent call last):
  File "Python37\lib\site-packages\htmlark.py", line 177, in convert_page
    _, page_text = _get_resource(page_path)
  File "Python37\lib\site-packages\htmlark.py", line 77, in _get_resource
    raise ValueError("Not local path or HTTP/HTTPS URL", url_parsed.scheme)
ValueError: ('Not local path or HTTP/HTTPS URL', 'c')
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

1 participant