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

Corruption at the end of JSON #9

Open
ghost opened this issue Jan 8, 2018 · 2 comments
Open

Corruption at the end of JSON #9

ghost opened this issue Jan 8, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Jan 8, 2018

So i kinda thought that i would be able to just download the .db file and look up what the tables were called with SELECT * from master-sql but there are no tables there. I mean i guess it worked once, but there was all these ascii errors at the end of the search when i put in SELECT * from food_desc. I've been trying to work on the .py file to see if i have to refresh the database or something but im stuck with this error.

line 278, in refresh
for line in f:
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0x91 in position 4009: ordinal not in range(128)

I don't want to refresh the data base but i am still trying to get the calorie, and carb/fat/protein count for each food.

Sorry kinda new to this, i don't know what to do.

@ghost ghost closed this as completed Jan 8, 2018
@ghost
Copy link
Author

ghost commented Jan 8, 2018

I am unsure if the database has been created.

@ghost ghost reopened this Jan 8, 2018
@ghost
Copy link
Author

ghost commented Jan 9, 2018

I have created the table as per instructions, and created the json file. When i try to read the json file i get the following error

File "/usr/lib/python3.5/json/init.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.5/json/init.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 342, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 55732)

@ghost ghost changed the title No tables in .db file Corruption at the end of JSON Jan 9, 2018
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

0 participants