Skip to content

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

@agbocsardi

Description

@agbocsardi

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions