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

BreezeConnect API connection issue #169

Open
GauravSuryavanshi2020 opened this issue Dec 14, 2024 · 12 comments
Open

BreezeConnect API connection issue #169

GauravSuryavanshi2020 opened this issue Dec 14, 2024 · 12 comments

Comments

@GauravSuryavanshi2020
Copy link

Below code worked fine yesterday with yesterday's api_session token. Not working today with today's token
from breeze_connect import BreezeConnect
import pandas as pd
api_key = "MyAPIKey"
api_secret = "MyAPISecret"
api_session = "MyAPISessionfor Today"
breeze = BreezeConnect(api_key=api_key)
breeze.generate_session(api_secret=api_secret,session_token=api_session)

getting below Error response 👍 ---------------------------------------------------------------------------
JSONDecodeError Traceback (most recent call last)
File ~\anaconda3\Lib\site-packages\requests\models.py:974, in Response.json(self, **kwargs)
973 try:
--> 974 return complexjson.loads(self.text, **kwargs)
975 except JSONDecodeError as e:
976 # Catch JSON-related errors and raise as requests.JSONDecodeError
977 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError

File ~\anaconda3\Lib\json_init_.py:346, in loads(s, cls, object_hook, parse_float, parse_int, parse_constant, object_pairs_hook, **kw)
343 if (cls is None and object_hook is None and
344 parse_int is None and parse_float is None and
345 parse_constant is None and object_pairs_hook is None and not kw):
--> 346 return _default_decoder.decode(s)
347 if cls is None:

File ~\anaconda3\Lib\json\decoder.py:337, in JSONDecoder.decode(self, s, _w)
333 """Return the Python representation of s (a str instance
334 containing a JSON document).
335
336 """
--> 337 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
338 end = _w(s, end).end()

File ~\anaconda3\Lib\json\decoder.py:355, in JSONDecoder.raw_decode(self, s, idx)
354 except StopIteration as err:
--> 355 raise JSONDecodeError("Expecting value", s, err.value) from None
356 return obj, end

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

JSONDecodeError Traceback (most recent call last)
File ~\anaconda3\Lib\site-packages\breeze_connect\breeze_connect.py:797, in BreezeConnect.api_util(self)
796 response = requests.get(url=url, data=body, headers=headers)
--> 797 json_data = response.json()
798 if 'Success' in json_data and json_data['Success'] is not None:

File ~\anaconda3\Lib\site-packages\requests\models.py:978, in Response.json(self, **kwargs)
975 except JSONDecodeError as e:
976 # Catch JSON-related errors and raise as requests.JSONDecodeError
977 # This aliases json.JSONDecodeError and simplejson.JSONDecodeError
--> 978 raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Exception Traceback (most recent call last)
Cell In[7], line 1
----> 1 breeze.generate_session(api_secret=api_secret,session_token=api_session)

File ~\anaconda3\Lib\site-packages\breeze_connect\breeze_connect.py:858, in BreezeConnect.generate_session(self, api_secret, session_token)
856 self.session_key = session_token
857 self.secret_key = api_secret
--> 858 self.api_util()
859 self.get_stock_script_list()
860 self.api_handler = ApificationBreeze(self)

File ~\anaconda3\Lib\site-packages\breeze_connect\breeze_connect.py:816, in BreezeConnect.api_util(self)
813 raise Exception("Unexpected format in API response")
814 except json.decoder.JSONDecodeError:
815 # Handle JSON decoding error
--> 816 raise Exception("Invalid JSON format in API response")
817 except KeyError as e:
818 # Handle missing key error
819 raise Exception(f"KeyError: {e} not found in API response")

Exception: Invalid JSON format in API response

@Ramkumar-R
Copy link

Same error being experienced here too

@GauravSuryavanshi2020
Copy link
Author

@Idirect-Tech Any updates on the above issue. IS breeze api down today ?

@deepakdahuja77
Copy link

Yes, not able to use API today, @Idirect-Tech please update ETA for fix

@sanjayssk
Copy link

Same problem since yesterday for Javascript API. Please fix.

@sushantbisht
Copy link

API is down but no information forthcoming from the breeze team

@Mizzlr
Copy link

Mizzlr commented Dec 15, 2024

This is the error we are getting from ICICI Breeze (nginx) server. HTTP 502 (bad gateway).

<!DOCTYPE html>
<html>
<head>
<title>Error</title>
<style>
html { color-scheme: light dark; }
body { width: 35em; margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif; }
</style>
</head>
<body>
<h1>An error occurred.</h1>
<p>Sorry, the page you are looking for is currently unavailable.<br/>
Please try again later.</p>
<p>If you are the system administrator of this resource then you should check
the error log for details.</p>
<p><em>Faithfully yours, nginx.</em></p>
</body>
</html>

ICICI Direct team, please help once you are back on Monday (12/16).

@sushantbisht
Copy link

Need faster response from the Breeze team. If there is an outage, it will be good to share that with the users and the approximate time required for the corrective actions.

@Muthu-ML
Copy link

Muthu-ML commented Dec 15, 2024

Same error here as well. Need faster response from the Breeze team. @Idirect-Tech

@Idirect-Tech
Copy link
Owner

Idirect-Tech commented Dec 15, 2024 via email

@Idirect-Tech
Copy link
Owner

Idirect-Tech commented Dec 15, 2024 via email

@sanjayssk
Copy link

It's working now. Thanks.

@Mizzlr
Copy link

Mizzlr commented Dec 17, 2024

It's working now. Thank you and kudos to ICICI breeze team!

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

8 participants