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

Getting "AttributeError: 'NoneType' object has no attribute 'string'" #51

Open
gbocsardi opened this issue Apr 5, 2024 · 0 comments
Open

Comments

@gbocsardi
Copy link

I run my code on python3 using the following:

$ .venv/bin/python -m congressionalrecord.cli 2001-01-06 2020-12-31 json
Traceback (most recent call last):
  File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/data/volume_2/POLARIZATION/POLARIZATION/congress_scraper/congressional-record/congressionalrecord/cli.py", line 77, in <module>
    main()
  File "/data/volume_2/POLARIZATION/POLARIZATION/congress_scraper/congressional-record/congressionalrecord/cli.py", line 67, in main
    dl(args.start, end=args.end, do_mode='json')
  File "/data/volume_2/POLARIZATION/POLARIZATION/congress_scraper/congressional-record/congressionalrecord/govinfo/downloader.py", line 128, in __init__
    for crfile in self.bulkdownload(start, **kwargs):
  File "/data/volume_2/POLARIZATION/POLARIZATION/congress_scraper/congressional-record/congressionalrecord/govinfo/downloader.py", line 58, in bulkdownload
    crfile = ParseCRFile(parse_path, crdir)
  File "/data/volume_2/POLARIZATION/POLARIZATION/congress_scraper/congressional-record/congressionalrecord/govinfo/cr_parser.py", line 473, in __init__
    self.gen_file_metadata()
  File "/data/volume_2/POLARIZATION/POLARIZATION/congress_scraper/congressional-record/congressionalrecord/govinfo/cr_parser.py", line 213, in gen_file_metadata
    self.find_people()
  File "/data/volume_2/POLARIZATION/POLARIZATION/congress_scraper/congressional-record/congressionalrecord/govinfo/cr_parser.py", line 144, in find_people
    {'type':'parsed'}).string] = \
AttributeError: 'NoneType' object has no attribute 'string'

It looks similar to #33. If I manually adjust the start date to one day later, it continues on fine, until it encounters another one of the same error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant