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

zscaler [Bug] #1217

Open
tommorgan365 opened this issue Aug 31, 2023 · 1 comment
Open

zscaler [Bug] #1217

tommorgan365 opened this issue Aug 31, 2023 · 1 comment

Comments

@tommorgan365
Copy link

zscaler

Starting throwing this error - no changes on the input.

Traceback (most recent call last):
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/worker/Zscaler/zscaler.py", line 111, in
ZscalerAnalyzer().run()
File "/worker/Zscaler/zscaler.py", line 102, in run
response = s.json()
^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 975, in json
raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

@tommorgan365 tommorgan365 changed the title [Bug] zscaler [Bug] Aug 31, 2023
@SgtMoose
Copy link

SgtMoose commented Jul 10, 2024

@tommorgan365 - See if this helps. I got to looking into this issue since I've been trying to get it working since the beginning of the year and it's a challenge for StrangeBee support as they do not have a Zscaler instance to test with. I started poking through the Python script for the Zscaler analyzer and noticed on lines 99 & 100 that /api/v1/etc... is being appended to the base_uri value.

Zscaler documentation states that part of the base URL is https://zsapi.(Zscaler Cloud Name)/api/v1. SInce I saw in the script that /api/v1 is being appeneded, I shortened the base URL to https://zsapi.(Zscaler Cloud Name), in my case https://zsapi.zscalertwo.net and the Analyzer successfully worked.

Hopefully this helps!

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