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

KeyError: 'item' in core.py #18

Open
DJStompZone opened this issue Sep 17, 2022 · 2 comments
Open

KeyError: 'item' in core.py #18

DJStompZone opened this issue Sep 17, 2022 · 2 comments

Comments

@DJStompZone
Copy link

>>> os.listdir()
['.BRAPI.postman_collection.json']
>>> collection=[os.listdir()[0]]
>>> runner = PostPython(collection)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\DJStomp\AppData\Local\Programs\Python\Python310\lib\site-packages\postpy2\core.py", line 35, in __init__
    self.__load()
  File "C:\Users\DJStomp\AppData\Local\Programs\Python\Python310\lib\site-packages\postpy2\core.py", line 40, in __load
    for request in fol['item']:
KeyError: 'item'
@papadeltasierra
Copy link

Hitting this too. Looks to me like the collection layout is quite different to that expected by the parsing. If you patch around this you then find that the "name" of a request is at the wrong level too. Has POSTMAN changed the format again and this library not kept up?

@papadeltasierra
Copy link

Also see #1 which has a workaround if you rework the POSTMAN collection slightly.

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

2 participants