I just noticed that this question has been sitting unanswered for a long time. Sorry about that.
If you are still in need of assistance, could you point me to this code for "swClassLib"? I can't tell just from the exception trace what the underlying error is.
I've come across the same issue. The source code is around 7,500 lines long, so instead of posting code snippets out of context:
Here is a link to the repo.
I believe the function of interest is in swClassLib at line 88, sendRequest().
Send request is called in multiple functions, (such as getOrionContainer at line 572) in the form of:
currOrionContainer = self.sendRequest(
URL='/SolarWinds/InformationService/v3/Json/Query?query=' + selectQuery, #Select query is essentially a mySQL query
In my case I get the same error, which is dumped by the caller() function as a result of a failed Try/Except. I believe my issue could be my basic understanding of this code, for example I initialize my class as so:
from swClassLib import *
from swCommonLib import *
SW = SolarWinds(ip = 'X.X.X.X', username = '<my_username>',password = 'passwordistaco')
and then I try to access a table in the database.
myTableofInterest = getOrionContainer()
^ this is the call that results in the same error as the OP's.
My question is, Am I receiving an error because I don't understand the API and I'm not accessing the database correctly? Or is there another underlying issue...
The instructions at Troubleshooting · Plexxi/SolarWindsOrionREST Wiki · GitHub say that this error could result from an incorrect IP address. I suspect it could also be caused by a firewall blocking connections from wherever you are running the script to port 17778 on the Orion server.
That wiki page also says, "you can modify a global variable in swClassLib.py, DEBUG = 0, 1, or 2, which has increasing levels of debug". Have you tried that to see if it results in a more informative error message?
I hadn't seen that bit about the debug levels, thank you very much! That gives me something to go on.