glasgow-ipl / ietfdata

Python libraries to access the IETF DataTracker and RFC Index
BSD 2-Clause "Simplified" License
18 stars 13 forks source link

PavlovaParsingError: Field: consent missing on dt.iab_chair().name #126

Open sbenthall opened 1 year ago

sbenthall commented 1 year ago

Running this code from the examples/ directory in a local notebook in an environment with ietfdata installed using pip install -U ietfdata:

from datetime                 import timedelta
from pathlib                  import Path
from ietfdata.datatracker     import *
from ietfdata.datatracker_ext import *
from dateutil.parser          import *

dt = DataTrackerExt()

# =============================================================================
# Information about the IAB:

print(F"The IAB chair is {dt.iab_chair().name}")

print("The IAB members are:")
for m in dt.iab_members():
    print(F"  {m.name}")
print("")

I'm getting the following error/stack trace: https://gist.github.com/sbenthall/688b3e9fb920e0f1f7ec212718a491a0

I wonder if there's been an API change, or if I've mistaken the configuration/installation somehow.

lumisota commented 1 year ago

Which version of the library are you using? The consent field for the person endpoint was removed a while ago (~October 2022), I think.

sbenthall commented 1 year ago

Thank you. I was using version 6.0. I determined that this was because my Python environment was running Python 3.8. I've now updated the environment to use Python 3.7. I am now using ietfdata version 0.6.7.

Now I get a different error: KeyError: typing.Optional

https://gist.github.com/sbenthall/5179ad535052685f849cb36af25d6e11

lumisota commented 1 year ago

It looks like you're using Python 3.10, which I think makes changes to typing hints, so there might be refactoring needed to support that. I'll take a look.

In the meantime, the library should work with 3.9.

sbenthall commented 1 year ago

Aha. That does sound right. Thanks. I'll switch to 2.9 for now.

lumisota commented 1 year ago

Thanks; have added #128 -- will look at support for more recent Python versions.