You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File ".../__init__.py", line 239, in __init__
preprocess_stylesheet(
File ".../css/__init__.py", line 1017, in preprocess_stylesheet
rule_descriptors = dict(
File ".../css/validation/descriptors.py", line 49, in preprocess_descriptors
value = function(tokens, base_url)
File ".../css/utils.py", line 153, in wrapper
result = function(remove_whitespace(part), *args)
File ".../css/validation/descriptors.py", line 145, in src
tokens, token = tokens[:-1], tokens[-1]
IndexError: tuple index out of range
It's crashing on invalid .css entries with commas at the end, like:
So I found the issue was the comma, but maybe some useful output would be good here? The error is because tokens is empty, and the code's test for <= 2 items then assumes there's an actual last item anyway.
The text was updated successfully, but these errors were encountered:
It's crashing on invalid .css entries with commas at the end, like:
It'd be difficult for most users to find what the problem is. I modified the code to print tokens to try to debug it:
So I found the issue was the comma, but maybe some useful output would be good here? The error is because tokens is empty, and the code's test for <= 2 items then assumes there's an actual last item anyway.
The text was updated successfully, but these errors were encountered: