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

Bug in "activities.py add": if you provide TR version of spec, you get "TypeError: 'BetterUrl' object is not subscriptable" #655

Open
dholbert opened this issue Jun 16, 2022 · 0 comments · May be fixed by #787
Labels

Comments

@dholbert
Copy link
Contributor

dholbert commented Jun 16, 2022

STR:

  1. In a clone of this repo, run: python ./activities.py add https://www.w3.org/TR/css-contain-3/
    (note this the URL I'm giving here is for the official TR version of the spec, not the editor's draft)

ACTUAL RESULTS:

Traceback (most recent call last):
  File "/scratch/work/builds/standards-positions/./activities.py", line 290, in fetch_spec_data
    spec_data = self.parser().parse(soup, url)
  File "/scratch/work/builds/standards-positions/./activities.py", line 416, in parse
    raise BetterUrl(ed_url)
__main__.BetterUrl: https://drafts.csswg.org/css-contain-3/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/scratch/work/builds/standards-positions/./activities.py", line 607, in <module>
    ENTRY = SpecEntry(SPEC_URL)
  File "/scratch/work/builds/standards-positions/./activities.py", line 257, in __init__
    new_entry = self.fetch_spec_data(spec_url)
  File "/scratch/work/builds/standards-positions/./activities.py", line 292, in fetch_spec_data
    new_url = why[0]
TypeError: 'BetterUrl' object is not subscriptable

EXPECTED RESULTS:
The script should properly replace (or alert me of) its suggested better-URL (the editor's draft in this case) without throwing exceptions-on-top-of-exceptions. :)

@bgrins bgrins added the tooling label Nov 22, 2022
martinthomson added a commit to martinthomson/standards-positions that referenced this issue Apr 24, 2023
@martinthomson martinthomson linked a pull request Apr 24, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants