skip to Main Content

I had read Yelp dataset’s documentation well, proceeded to download the yelp_dataset.tar and extracted all json files (without any character encoding error). Unfortunately, converting those files from to would output this:

ModuleNotFoundError: No module named 'simplejson'

You can have a look at the json_to_csv_converter.py file’s image here

Can someone help solve this problem?
Thank you for taking your time.

2

Answers


  1. simplejson is not part of the standard library and needs to be installed. Have you tried installing it?

    pip install simplejson
    will work if you use pip, or
    conda install simplejson for conda

    Login or Signup to reply.
  2. You can install the simplejson using pip if it’s not installed. If it’s still causing the issues, you can use json form python built-in libraries.

    json is simplejson, added to the stdlib. Json library is as fast as simplejson and has fewer refused-to-be-fixed Unicode bugs.

    A good practice will be to use one or the other as a fallback.

    try:
        import simplejson as json
    except ImportError:
        import json
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search