def _read(self):
        with self.lock:
            unicode_path = unicode('%s/%s.yaml' % (self.path, self.user.username))
            if path_exists(unicode_path):
                try:
                    with open(unicode_path, 'r') as f:
                        file_store_items = yaml.load(f)

                        self.user_items = {}
                        if file_store_items:
                            for item in file_store_items:
                                item_amount = file_store_items[item]['amount']
                                self.user_items[str(item)] = {
                                    'amount': item_amount
                                }
                except (IOError, KeyError, yaml.YAMLError) as e:
                    LOG.error('Failed loading store items file "%s": %s', self.path, str(e))
                    raise StoreError('Failed loading store items file "%s": %s' % (self.path, str(e)))

            else:
                self.user_items = {}
dataset/ETHPy150Open turbulenz/turbulenz_local/turbulenz_local/models/apiv1/store.py/StoreUserGameItems._read/original