openstates / issues

Having trouble? Looking to contribute? Issues live here!
15 stars 2 forks source link

VA Bills: bill identifier is None error #1259

Closed jessemortenson closed 1 week ago

jessemortenson commented 1 week ago

The VA bills scraper is currently failing with an error:

[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base] 11:33:05 INFO openstates: save bill HB1552 in 2025 as bill_e0107d78-a5a0-11ef-9d62-0ee015c9529d.json
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base] 11:33:06 INFO openstates: Skipping vote H182024-02-091 with no pass fail
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base] 11:33:06 INFO openstates: Skipping vote H182024-02-092 with no pass fail
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base] Traceback (most recent call last):
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]   File "/root/.cache/pypoetry/virtualenvs/openstates-scrapers-vRcYrsYN-py3.9/bin/os-update", line 8, in <module>
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]     sys.exit(main())
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]   File "/root/.cache/pypoetry/virtualenvs/openstates-scrapers-vRcYrsYN-py3.9/lib/python3.9/site-packages/openstates/cli/update.py", line 601, in main
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]     report = do_update(args, other, juris)
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]   File "/root/.cache/pypoetry/virtualenvs/openstates-scrapers-vRcYrsYN-py3.9/lib/python3.9/site-packages/openstates/cli/update.py", line 390, in do_update
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]     report["scrape"] = do_scrape(juris, args, scrapers, active_sessions)
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]   File "/root/.cache/pypoetry/virtualenvs/openstates-scrapers-vRcYrsYN-py3.9/lib/python3.9/site-packages/openstates/cli/update.py", line 133, in do_scrape
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]     partial_report = scraper.do_scrape(**scrape_args, session=session)
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]   File "/root/.cache/pypoetry/virtualenvs/openstates-scrapers-vRcYrsYN-py3.9/lib/python3.9/site-packages/openstates/scrape/base.py", line 236, in do_scrape
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]     for obj in self.scrape(**kwargs) or []:
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]   File "/opt/openstates/openstates/scrapers/va/bills.py", line 90, in scrape
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]     yield from self.add_votes(bill, row["LegislationID"])
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]   File "/opt/openstates/openstates/scrapers/va/bills.py", line 266, in add_votes
[2024-11-18, 11:33:06 UTC] {pod_manager.py:472} INFO - [base]     f"{row['BatchNumber'].strip()}-{bill.identifier.strip()}-"
[2024-11-18, 11:33:08 UTC] {pod_manager.py:490} INFO - [base] AttributeError: 'NoneType' object has no attribute 'strip'
jessemortenson commented 1 week ago

Should be fixed