All Apps and Add-ons

Compatible with Splunk_TA_google-cloudplatform ?

jypyking
Explorer

Hi,

I've installed this add-on on a HF that also have the Splunk_TA_google-cloudplatform add-on. For some reason it looks like this IA is trying to use the oauth2client lib from the Splunk_TA_google-cloudplatform instead of the one from its own folder and fail.
I tried adding the _init_.py file in "/opt/splunk/etc/apps/IA-GSuiteForSplunk/bin" but it doesn't change anything.
Any clue ?
Thanks.

Traceback (most recent call last):
File "/opt/splunk/bin/rest_handler.py", line 79, in
print splunk.rest.dispatch(**params)
File "/opt/splunk/lib/python2.7/site-packages/splunk/rest/init.py", line 149, in dispatch
module = import('splunk.rest.external.%s' % parts[0], None, None, parts[0])
File "/opt/splunk/etc/apps/IA-GSuiteForSplunk/bin/ga_authorize.py", line 14, in
from oauth2client.client import OAuth2WebServerFlow
File "/opt/splunk/etc/apps/Splunk_TA_google-cloudplatform/bin/oauth2client/client.py", line 46, in
from oauth2client import util
ImportError: cannot import name util

0 Karma
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

Due to App Precedence, Splunk will pull the library from the first path location it finds. This is an issue with the way core Splunk implements the framework. A solution could be to see if Splunk_TA_googlecloudplatform works with the oauth2client that ships with G Suite, and replace the Splunk one. You can also move the util folder from Splunk_TA_gcp and stick it in the GSuite/bin folder so that the import works correctly.

View solution in original post

0 Karma

jypyking
Explorer

Thanks! Actually copying the util.py file from the cloudplatform app to the Gsuite app fixed it 🙂

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

Due to App Precedence, Splunk will pull the library from the first path location it finds. This is an issue with the way core Splunk implements the framework. A solution could be to see if Splunk_TA_googlecloudplatform works with the oauth2client that ships with G Suite, and replace the Splunk one. You can also move the util folder from Splunk_TA_gcp and stick it in the GSuite/bin folder so that the import works correctly.

0 Karma
Get Updates on the Splunk Community!

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...