Getting empty dictionary in Service.entities
I tried to get the data from this site: http://knesset.gov.il/Odata/ParliamentInfo.svc/
This is the code I used:
from odata import ODataService
url = 'http://knesset.gov.il/Odata/ParliamentInfo.svc/'
Service = ODataService(url, reflect_entities=True)
print(len(Service.entities))
The result is:
0
It should return a dictionary with all the tables on the site. There is data on the site, and I think the format is good. Maybe the problem is with the metadata.
Is there a way to fix this? Thanks,
Based on http://knesset.gov.il/Odata/ParliamentInfo.svc/$metadata the site does not appear to support the OData 4 version used by python-odata.
You may want to look at the fork https://github.com/klem4/python-odata
It appears that it has been revised to support OData version 3. I know nothing else about this fork, but did a quick test using it with your code. The result was 38 entities in Service. Perhaps this will work for you.