When I tried to parse an HTML which has a local css file, it generated this error
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/pynliner/__init__.py", line 112, in run
self._get_styles()
File "/usr/local/lib/python2.7/dist-packages/pynliner/__init__.py", line 141, in _get_styles
self._get_external_styles()
File "/usr/local/lib/python2.7/dist-packages/pynliner/__init__.py", line 164, in _get_external_styles
url = self.relative_url + url
AttributeError: 'Pynliner' object has no attribute 'relative_url'
Looks like the variable 'relative_url' is not defined when a call from function other than from_url() is made. To be more clear, when one tries to do a Pynliner().from_string(html_string).with_cssString(css_string).run() where the html_string already contains a 'link' to a local stylesheet, it generates this error.
For starters, it might be confusing to see this error. A newbie, in the absence of guiding documentation, might want to pass the stringified css file to the stringified html file, where the html file already contained a link to that css file locally
When I tried to parse an HTML which has a local css file, it generated this error
Looks like the variable 'relative_url' is not defined when a call from function other than from_url() is made. To be more clear, when one tries to do a
Pynliner().from_string(html_string).with_cssString(css_string).run()where thehtml_stringalready contains a 'link' to a local stylesheet, it generates this error.For starters, it might be confusing to see this error. A newbie, in the absence of guiding documentation, might want to pass the stringified css file to the stringified html file, where the html file already contained a link to that css file locally