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

Skip adding text when there is no summary (adding cosponsors) #55

Closed
aih opened this issue Nov 18, 2020 · 1 comment
Closed

Skip adding text when there is no summary (adding cosponsors) #55

aih opened this issue Nov 18, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@aih
Copy link
Collaborator

aih commented Nov 18, 2020

Running python manage.py related_bills, I get this error:

Adding sponsor info
116hjres58 - bill has updated.
Cosponsors are added to bill - 116hjres58.
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/Users/arihershowitz/.pyenv/versions/flatgov/lib/python3.7/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/Users/arihershowitz/Documents/workspace/FlatGovDir/FlatGov/server_py/flatgov/common/management/commands/related_bills.py", line 14, in handle
    makeAndSaveRelatedBills()
  File "/Users/arihershowitz/Documents/workspace/FlatGovDir/FlatGov/server_py/flatgov/common/relatedBills.py", line 171, in makeAndSaveRelatedBills
    addSponsors()
  File "/Users/arihershowitz/Documents/workspace/FlatGovDir/FlatGov/server_py/flatgov/common/relatedBills.py", line 109, in addSponsors
    summary = billData.get('summary', {}).get('text')
AttributeError: 'NoneType' object has no attribute 'get'
@aih aih added the bug Something isn't working label Nov 18, 2020
@kapphire
Copy link
Collaborator

Fixed

@aih aih closed this as completed Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants