question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

WARNING_RECORD message KeyError leaves pool open

See original GitHub issue

Got such error while opening a connection to outlook.office365.com exchange server.

pypsrp == 0.4.0

>  with RunspacePool(wsman, configuration_name='Microsoft.Exchange') as pool:

test_psremote.py:16: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
C:\Python37\lib\site-packages\pypsrp\powershell.py:200: in __enter__
	self.open()
C:\Python37\lib\site-packages\pypsrp\powershell.py:513: in open
	responses.extend(self._receive())
C:\Python37\lib\site-packages\pypsrp\powershell.py:637: in _receive
	return self._parse_responses(response, pipeline)

Attached file with responses: responses-warning.txt As I can understand there is no pipeline created at the moment we receive warning message.

Warning message which caused KeyError image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jborean93commented, May 15, 2020

Thanks for the bug report, I was never aware that a warning could be sent at this moment, will have to add that functionality in a similar way to your monkeypatch.

0reactions
jborean93commented, Jul 22, 2020

Sorry for the delay I’ve fixed this issue in https://github.com/jborean93/pypsrp/pull/82 and will be in the upcoming 0.5.0 release. Just an FYI though it seems like Exchange Online no longer issues this warning so the current release will start working again. In any case if they do re-add one later on the 0.5.0 will be able to handle it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python KeyError Exceptions and How to Handle Them
In this tutorial, you'll learn how to handle Python KeyError exceptions. They are often caused by a bad key lookup in a dictionary,...
Read more >
How to Fix KeyError Exceptions in Python - Rollbar
The Python KeyError is an exception that occurs when an attempt is made to access an item in a dictionary that does not...
Read more >
How to fix Python KeyError Exceptions in simple steps?
A Python KeyError is raised when you try to access an invalid key in a dictionary. In simple terms, when you see a...
Read more >
KeyError raised when trying to access a key in a dictionary
key error is raised when a key is not in the dictionary. Here 'leaf' is not in tree[0], so it raises this error....
Read more >
`meson help foo` KeyError · Issue #10584 - GitHub
Describe the bug meson help needs an existing command as . Passing anything else leads to a KeyError instead of a nice error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found