bsedata icon indicating copy to clipboard operation
bsedata copied to clipboard

Getting Inactive Stock error

Open viniesta11 opened this issue 3 years ago • 1 comments

Hi, I tried VerifyScriptCode() then tried to get Quote of a company stilll getting error Can you please help me ?

viniesta11 avatar Dec 10 '21 17:12 viniesta11

hey, i think you just wrote something like this:- b.verifyScripCode("500010") #this is wrong as it does nothing verifyScripCode() only provides name of the stock if it is vaild eg:- if a stock is invalid it will return "None" eg:- for invalid stock print(b.verifyScripCode("999999")) Output:- None another eg:- for valid stock print(b.verifyScripCode("543284")) Output:- Eki Energy Services Ltd ANSWER:- You have to use a if statement eg:-

if b.verifyScripCode("500010") == None: print("invaid stock") #codes to tell what to do if a stock is invalid, tip:- you could do break or continue etc

I had the same problem but then after some experimentation found the solution. If you didnt understand read again or reply with your code i will try to solve it just dont quit. I didnt quit when i had this problem cause i know you only fail when you stop quit. Simple logic

ahelpfulguy avatar Dec 30 '21 10:12 ahelpfulguy

just published a new version on pypi, which should fix this issue. please upgrade to the latest version.

sdabhi23 avatar Mar 18 '23 06:03 sdabhi23