from xbrl import XBRLParser, GAAP, GAAPSerializer
import bs4, lxml
xbrl = xbrl_parser.parseGAAP(file(r"C:\Users\anant\NETRA\https---archives.nseindia.com-corporate-xbrl-INDAS_90168_794349_14022023041135.xml.url"))
here I am trying to use a python-xbrl package. the error of "name 'file' is not defined" is showing up.
please guide me, resolving this issue.
It looks like you're trying to run Python 2 code in Python 3. See Python 3 doesn't have the file function.
As a more general point, it looks like you're trying to read non-US-GAAP XBRL. The
python-xbrllibrary is not a general purpose XBRL processor, and is unlikely to work with XBRL from other sources. I would recommend looking at using a different XBRL processor, such as Arelle.