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

Unbale to genereate Token Failing at 2FA validation #510

Open
abhishekanne opened this issue Aug 2, 2023 · 7 comments
Open

Unbale to genereate Token Failing at 2FA validation #510

abhishekanne opened this issue Aug 2, 2023 · 7 comments

Comments

@abhishekanne
Copy link

I have updated to latest package alice-blue 2.0.4
I am getting error at 2FA validation getting 404 in my python code earlier it was working.

See the logs

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): ant.aliceblueonline.com:443
DEBUG:urllib3.connectionpool:https://ant.aliceblueonline.com:443 "POST /rest/AliceBlueAPIService/sso/validAnswer HTTP/1.1" 404 None
INFO:root:Web Login 2FA response <!doctype html><title>HTTP Status 404 – Not Found</title><script src="/cdn-cgi/apps/head/OBPNgRNPyf5LWLfQp694iRMfV1w.js"></script><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style>

HTTP Status 404 – Not Found

<script defer src="https://static.cloudflareinsights.com/beacon.min.js/v8b253dfea2ab4077af8c6f58422dfbfd1689876627854" integrity="sha512-bjgnUKX4azu3dLTVtie9u6TKqgx29RBwfj3QXYt5EKfWM/9hPSAI/4qcV5NACjwAo8UtTeWefx6Zq5PHcMm7Tg==" data-cf-beacon='{"rayId":"7f06a1982dc34829","version":"2023.7.0","b":1,"token":"46191df1e0324e209e0003a259ebc24f","si":100}' crossorigin="anonymous"></script>

Traceback (most recent call last): File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 971, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\json\__init__.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\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 "f:\Algo\algopy\AlgoBlindPy\RnDAliceBlueScrips.py", line 13, in
session_id = AliceBlue.login_and_get_sessionID( username = username,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\site-packages\alice_blue\alice_blue.py", line 216, in login_and_get_sessionID
isAuthorized = r.json()['isAuthorized']
^^^^^^^^
File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\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)

@ImAbhishekTomar
Copy link

I'm also facing the same issue.

@gousKDT
Copy link

gousKDT commented Sep 18, 2023

Me too and I could see in the log below is throwing error.

AliceBlueAPIService/sso/validAnswer HTTP/1.1" 404 None

@kapiltulsan
Copy link

I too am facing the same issue, request support

@deepak-basavaraju
Copy link

I'm facing a similar issue. Please resolve this.

Traceback (most recent call last):
File "/Users/deepakbasavaraju/Documents/GitHub/quantiple/env/lib/python3.11/site-packages/requests/models.py", line 971, in json
return complexjson.loads(self.text, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/init.py", line 346, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/Cellar/[email protected]/3.11.4_1/Frameworks/Python.framework/Versions/3.11/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 "", line 1, in
File "/Users/deepakbasavaraju/Documents/GitHub/quantiple/env/lib/python3.11/site-packages/alice_blue/alice_blue.py", line 216, in login_and_get_sessionID
isAuthorized = r.json()['isAuthorized']
^^^^^^^^
File "/Users/deepakbasavaraju/Documents/GitHub/quantiple/env/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)

@anurag199831
Copy link

Facing same issue...is it not resolved yet?

@jingahr
Copy link

jingahr commented Feb 13, 2024

What is solution for this ?
i get error :
DEBUG:urllib3.connectionpool:https://ant.aliceblueonline.com:443 "POST /rest/AliceBlueAPIService/sso/validAnswer HTTP/1.1" 404 None
INFO:root:Web Login 2FA response <!doctype html><title>HTTP Status 404 – Not Found</title><script src="/cdn-cgi/apps/head/LevqwntdubYOQ1V1cUP6VynfEJ0.js"></script><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style>

HTTP Status 404 – Not Found


Type Status Report

Message Not Found

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.


Apache Tomcat/9.0.78<

@jingahr
Copy link

jingahr commented Feb 13, 2024

I have updated to latest package alice-blue 2.0.4 I am getting error at 2FA validation getting 404 in my python code earlier it was working.

See the logs

DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): ant.aliceblueonline.com:443 DEBUG:urllib3.connectionpool:https://ant.aliceblueonline.com:443 "POST /rest/AliceBlueAPIService/sso/validAnswer HTTP/1.1" 404 None INFO:root:Web Login 2FA response <!doctype html><title>HTTP Status 404 – Not Found</title><script src="/cdn-cgi/apps/head/OBPNgRNPyf5LWLfQp694iRMfV1w.js"></script><style type="text/css">body {font-family:Tahoma,Arial,sans-serif;} h1, h2, h3, b {color:white;background-color:#525D76;} h1 {font-size:22px;} h2 {font-size:16px;} h3 {font-size:14px;} p {font-size:12px;} a {color:black;} .line {height:1px;background-color:#525D76;border:none;}</style>

HTTP Status 404 – Not Found

<script defer src="https://static.cloudflareinsights.com/beacon.min.js/v8b253dfea2ab4077af8c6f58422dfbfd1689876627854" integrity="sha512-bjgnUKX4azu3dLTVtie9u6TKqgx29RBwfj3QXYt5EKfWM/9hPSAI/4qcV5NACjwAo8UtTeWefx6Zq5PHcMm7Tg==" data-cf-beacon='{"rayId":"7f06a1982dc34829","version":"2023.7.0","b":1,"token":"46191df1e0324e209e0003a259ebc24f","si":100}' crossorigin="anonymous"></script>

Traceback (most recent call last): File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\site-packages\requests\models.py", line 971, in json return complexjson.loads(self.text, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\json_init_.py", line 346, in loads return _default_decoder.decode(s) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\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 "f:\Algo\algopy\AlgoBlindPy\RnDAliceBlueScrips.py", line 13, in session_id = AliceBlue.login_and_get_sessionID( username = username, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\site-packages\alice_blue\alice_blue.py", line 216, in login_and_get_sessionID isAuthorized = r.json()['isAuthorized'] ^^^^^^^^ File "C:\Users\Hp\AppData\Local\Programs\Python\Python311\Lib\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)

any way you solved this and connected to API in ALICEBLUE?

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

7 participants