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

collect-draft-metadata errors #587

Open
micahflee opened this issue Mar 26, 2023 · 0 comments
Open

collect-draft-metadata errors #587

micahflee opened this issue Mar 26, 2023 · 0 comments
Labels
Milestone

Comments

@micahflee
Copy link
Contributor

While working on #585 I found an error in bin/collect_draft_metadata.py:

$ python bin/collect_draft_metadata.py -w hrpc
Exception ignored in: <function DataTracker.__del__ at 0x1105f9b40>
Traceback (most recent call last):
  File "/Users/user/code/bigbang/env/lib/python3.10/site-packages/ietfdata/datatracker.py", line 1846, in __del__
    self.session.close()
AttributeError: 'DataTracker' object has no attribute 'session'
Traceback (most recent call last):
  File "/Users/user/code/bigbang/bin/collect_draft_metadata.py", line 110, in <module>
    main(args)
  File "/Users/user/code/bigbang/bin/collect_draft_metadata.py", line 104, in main
    collect_drafts(args.w)
  File "/Users/user/code/bigbang/bin/collect_draft_metadata.py", line 54, in collect_drafts
    dt = DataTracker(cache_dir=Path("cache"))
TypeError: DataTracker.__init__() got an unexpected keyword argument 'cache_dir'

It looks like the DataTracker constructor (in ietfdata) doesn't support cache_dir, at least the version that I installed.

When I migrated this over to the CLI in #585, I started to try to fix it simply by removing the cache_dir keyword argument. It gets farther this time, but some code inside the ietfdata module throws an exception:

$ bigbang collect-draft-metadata --working-group hrpc
Traceback (most recent call last):
  File "/Users/user/code/bigbang/env/bin/bigbang", line 8, in <module>
    sys.exit(main_cli())
  File "/Users/user/code/bigbang/env/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/Users/user/code/bigbang/env/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/Users/user/code/bigbang/env/lib/python3.10/site-packages/click/core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/user/code/bigbang/env/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/user/code/bigbang/env/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/Users/user/code/bigbang/env/lib/python3.10/site-packages/bigbang/cli.py", line 125, in collect_draft_metadata
    group = dt.group_from_acronym(wg)
  File "/Users/user/code/bigbang/env/lib/python3.10/site-packages/ietfdata/datatracker.py", line 2728, in group_from_acronym
    groups = list(self._retrieve_multi(url, Group))
  File "/Users/user/code/bigbang/env/lib/python3.10/site-packages/ietfdata/datatracker.py", line 2086, in _retrieve_multi
    fetch_obj = self.pavlova.from_mapping(obj_json, obj_type) # type: T
  File "/Users/user/code/bigbang/env/lib/python3.10/site-packages/pavlova/__init__.py", line 102, in from_mapping
    data[field.name] = self.parse_field(
  File "/Users/user/code/bigbang/env/lib/python3.10/site-packages/pavlova/__init__.py", line 150, in parse_field
    return self.parsers[base_type].parse_input(
KeyError: typing.Optional
@sbenthall sbenthall added this to the 0.5 milestone Mar 26, 2023
@sbenthall sbenthall modified the milestones: 0.5, 0.6 May 16, 2023
@sbenthall sbenthall added the CLI label May 16, 2023
@sbenthall sbenthall modified the milestones: 0.6, 0.7 Aug 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants