
import json
import os


def _load_json(file_path):
    """
    Reads JSON string from the file located in file_path.

    :param file_path: path of the file having JSON string.
    :return: JSON Object
    """
    with open(file_path, 'r') as f:
        return json.load(f)


_dir_name = os.path.dirname(os.path.realpath(__file__))
_locators_file_path = os.path.join(_dir_name, 'data', 'locators.json')
locators = _load_json(_locators_file_path)


import json
import os


def _load_json(file_path):
    """
    Reads JSON string from the file located in file_path.

    :param file_path: path of the file having JSON string.
    :return: JSON Object
    """
    with open(file_path, 'r', encoding='utf-8') as f:
        return json.load(f)


_dir_name = os.path.dirname(os.path.realpath(__file__))
_locators_file_path = os.path.join(_dir_name, 'data', 'locators.json')
locators = _load_json(_locators_file_path)

Fix locators reading on ubuntu
Fix locators reading on ubuntu

  
  import json
  import os
  
  
  def _load_json(file_path):
      """
      Reads JSON string from the file located in file_path.
  
      :param file_path: path of the file having JSON string.
      :return: JSON Object
      """
-     with open(file_path, 'r') as f:
+     with open(file_path, 'r', encoding='utf-8') as f:
          return json.load(f)
  
  
  _dir_name = os.path.dirname(os.path.realpath(__file__))
  _locators_file_path = os.path.join(_dir_name, 'data', 'locators.json')
  locators = _load_json(_locators_file_path)
  
Fix locators reading on ubuntu
## Code Before:

import json
import os


def _load_json(file_path):
    """
    Reads JSON string from the file located in file_path.

    :param file_path: path of the file having JSON string.
    :return: JSON Object
    """
    with open(file_path, 'r') as f:
        return json.load(f)


_dir_name = os.path.dirname(os.path.realpath(__file__))
_locators_file_path = os.path.join(_dir_name, 'data', 'locators.json')
locators = _load_json(_locators_file_path)

## Instruction:
Fix locators reading on ubuntu
## Code After:

import json
import os


def _load_json(file_path):
    """
    Reads JSON string from the file located in file_path.

    :param file_path: path of the file having JSON string.
    :return: JSON Object
    """
    with open(file_path, 'r', encoding='utf-8') as f:
        return json.load(f)


_dir_name = os.path.dirname(os.path.realpath(__file__))
_locators_file_path = os.path.join(_dir_name, 'data', 'locators.json')
locators = _load_json(_locators_file_path)
