I want to do a python script that is correcting spelling and grammar mistakes of a text. I found the gigerit library but when I try to run the code from their documentation, I receive an ugly error.

This is the code:

from gingerit.gingerit import GingerIt text = 'The smelt of fliwers bring back memories.' parser = GingerIt() parser.parse(text) 

And this is a part of the error:

JSONDecodeError Traceback (most recent call last) During handling of the above exception, another exception occurred: JSONDecodeError: Expecting value: line 1 column 1 (char 0) JSONDecodeError: [Errno Expecting value] <!DOCTYPE html> 

I also created another empty environment where I installed this library in order to avoid conflicts. But whatever I do, I can't manage to make this code run.

1 Answer

Had the same issue and fixed it with the following solution provided by MythicalMAxX on :

"It was cloudflare antibot which was blocking request. So you all can fix it by importing cloudscraper and replacing line 16 session = requests.Session() TO session = cloudscraper.create_scraper() In gingerit.py"

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy