Skip to content

Getting "AttributeError: 'NoneType' object has no attribute 'parent'" #33

@napsternxg

Description

@napsternxg

When I run my code via python2 using the following commands:

$ python -m congressionalrecord.cli "1994-02-11" "2017-09-27" json
Traceback (most recent call last):
  File "/homed/content/anaconda3/envs/python2/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/homed/content/anaconda3/envs/python2/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/content/anaconda3/envs/python2/lib/python2.7/site-packages/congressionalrecord/cli.py", line 75, in <module>
    main()
  File "/home/content/anaconda3/envs/python2/lib/python2.7/site-packages/congressionalrecord/cli.py", line 65, in main
    dl(args.start,end=args.end,do_mode='json')
  File "/homed/content/anaconda3/envs/python2/lib/python2.7/site-packages/congressionalrecord/fdsys/downloader.py", line 119, in __init__
    for crfile in self.bulkdownload(start,**kwargs):
  File "/homed/content/anaconda3/envs/python2/lib/python2.7/site-packages/congressionalrecord/fdsys/downloader.py", line 48, in bulkdownload
    crfile = ParseCRFile(parse_path,crdir)
  File "/homed/content/anaconda3/envs/python2/lib/python2.7/site-packages/congressionalrecord/fdsys/cr_parser.py", line 466, in __init__
    self.gen_file_metadata()
  File "/homed/content/anaconda3/envs/python2/lib/python2.7/site-packages/congressionalrecord/fdsys/cr_parser.py", line 197, in gen_file_metadata
    self.doc_ref = self.cr_dir.mods.find('accessid', text=self.access_path).parent
AttributeError: 'NoneType' object has no attribute 'parent'

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions