You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
``
from csvparser import *
from pyjsonq import JsonQ
channel_list_by_type,channel_list,channel_catagory_list =parse_csv_to_json()
qe =JsonQ(data={"channel_list":channel_list})
res = qe.at('channel_list').where('Channel_type', '=',"Movies Hindi").get()
print(res)
print("len =",len(res))
qe =JsonQ(data={"channel_list":channel_list})
res = qe.at('channel_list').where('Channel_type', '=',"MARATHI").get()
print(res)
print("len =",len(res))
('len =', 32)
Traceback (most recent call last):
File "/home/mahesh/firebase/wowd2h/jsonpersing.py", line 10, in
res = qe.at('channel_list').where('Channel_type', '=',"MARATHI").get()
File "/home/mahesh/firebase/wowd2h/.env/local/lib/python2.7/site-packages/pyjsonq/query.py", line 113, in at
self._json_data = self.__get_value_from_data(leaf, self._json_data)
File "/home/mahesh/firebase/wowd2h/.env/local/lib/python2.7/site-packages/pyjsonq/query.py", line 78, in __get_value_from_data
raise KeyError("Key not exists")
KeyError: 'Key not exists'
Process finished with exit code 1
but key "MARATHI" present in json
The text was updated successfully, but these errors were encountered:
``
from csvparser import *
from pyjsonq import JsonQ
channel_list_by_type,channel_list,channel_catagory_list =parse_csv_to_json()
qe =JsonQ(data={"channel_list":channel_list})
res = qe.at('channel_list').where('Channel_type', '=',"Movies Hindi").get()
print(res)
print("len =",len(res))
qe =JsonQ(data={"channel_list":channel_list})
res = qe.at('channel_list').where('Channel_type', '=',"MARATHI").get()
print(res)
print("len
=",len(res))
out put
[{'sl_no': 41, 'Channel_type': 'Movies Hindi', 'language': 'Hindi', 'FIREBASE_ID': '41', 'package': '', 'quality': 'SD', 'popularity': 75, 'channel_price': '0', 'is_premium': '0', 'channel_name': 'B4U Movies', 'free': True, 'img_url': ''}, , {'sl_no': 72, 'Channel_type': 'Movies Hindi', 'language': 'Hindi', 'FIREBASE_ID': '72', 'package': '', 'quality': 'HD', 'popularity': 72, 'channel_price': '19', 'is_premium': '1', 'channel_name': 'ZEE Cinema HD', 'free': False, 'img_url': ''}]
('len =', 32)
Traceback (most recent call last):
File "/home/mahesh/firebase/wowd2h/jsonpersing.py", line 10, in
res = qe.at('channel_list').where('Channel_type', '=',"MARATHI").get()
File "/home/mahesh/firebase/wowd2h/.env/local/lib/python2.7/site-packages/pyjsonq/query.py", line 113, in at
self._json_data = self.__get_value_from_data(leaf, self._json_data)
File "/home/mahesh/firebase/wowd2h/.env/local/lib/python2.7/site-packages/pyjsonq/query.py", line 78, in __get_value_from_data
raise KeyError("Key not exists")
KeyError: 'Key not exists'
Process finished with exit code 1
but key "MARATHI" present in json
The text was updated successfully, but these errors were encountered: