All Apps and Add-ons

G Suite For Splunk "'dict' object is not callable"

bokken1
Engager

Hello friends,

 

Been hacking away at the G Suite For Splunk app for about a day trying to figure out why we're getting the above error message on some inputs. I've gone all through the customer's proxy rules and ensured that's all good, as well as ensuring the install and permissioning of Splunk is also all good.

 

Here's the full error message I am seeing.

2021-02-01 03:27:37,481 log_level=ERROR pid=16382 tid=MainThread file="ModularInput.py" function="print_error" line_number="672" version="GSuiteForSplunk.v1.4.2.b310" host=GSuiteForSplunk sourcetype=GSuiteForSplunk:error source=gapps:SomeCustomers.com {"timestamp": "Mon, 01 Feb 2021 03:27:37 +0000", "log_level": "ERROR", "errors": [{"msg": "'dict' object is not callable", "exception_type": "<class 'TypeError'>", "exception_arguments": "'dict' object is not callable", "filename": "ga.py", "line": 164, "input_name": "ga://Activity_Access_Transparency"}]}

 

Splunk Version: 8.0.5

OS: CentOS 7.9.2009 (x86_64) out of AWS

Stackoverflow gives me back a fix that involves changing around the brackets that are used in the script for calling back a dictionary. Not sure I want to touch that one just yet.

https://stackoverflow.com/questions/6634708/typeerror-dict-object-is-not-callable#6634727

 

Any help or pointers on this would be very much appreciated.

 

Labels (3)
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

Thanks to @Anonymous for the answer to this bug!

ga_spreadsheets.py  - line 79

ga_authorize.py - line 128

GoogleAppsForSplunkModularInput.py - line 747

change

proxy_info = {"http": proxy_url, "https": proxy_url}

to

proxy_info = httplib2.ProxyInfo(httplib2.socks.PROXY_TYPE_HTTP, proxy_host=pc["host"], proxy_port=int(pc["port"]))

View solution in original post

alacercogitatus
SplunkTrust
SplunkTrust

Thanks to @Anonymous for the answer to this bug!

ga_spreadsheets.py  - line 79

ga_authorize.py - line 128

GoogleAppsForSplunkModularInput.py - line 747

change

proxy_info = {"http": proxy_url, "https": proxy_url}

to

proxy_info = httplib2.ProxyInfo(httplib2.socks.PROXY_TYPE_HTTP, proxy_host=pc["host"], proxy_port=int(pc["port"]))

bokken1
Engager

You guys are legends. I'll get this deployed, test it out and promote this answer. Cheers! 

0 Karma
Get Updates on the Splunk Community!

Holistic Visibility and Effective Alerting Across IT and OT Assets

Instead of effective and unified solutions, they’re left with tool fatigue, disjointed alerts and siloed ...

SOC Modernization: How Automation and Splunk SOAR are Shaping the Next-Gen Security ...

Security automation is no longer a luxury but a necessity. Join us to learn how Splunk ES and SOAR empower ...

Ask It, Fix It: Faster Investigations with AI Assistant in Observability Cloud

  Join us in this Tech Talk and learn about the recently launched AI Assistant in Observability Cloud. With ...