def ft_put(self):
        if not self.check_csv():
            raise Exception(
                "The delimiter of the source csv file is not '%s'" %
                self.csv_delimiter)

        # save new csv file with latlng data
        if self.ft_location_column and self.ft_latlng_column:
            target_file = self.csv_save_latlng()
            table = self.create_ft(target_file)
        else:
            table = self.create_ft(self.source_file)
        #logger.debug('body=%s' % body)

        # table columns are created, get tableId
        service_response = self.ft_service.table().insert(body=table).execute()
        #logger.debug("service_response=%s" % service_response)
        table_id = service_response["tableId"]

        # move to target folder
        if self.folder_id is not None:
            new_parent = {'id': self.folder_id}

            try:
                self.service.parents().insert(fileId=table_id, body=new_parent).execute()
            except apiclient.errors.HttpError as error:
                raise Exception('An error occurred: %s' % error)

            # remove from root folder
            try:
                self.service.parents().delete(fileId=table_id, parentId=self.root).execute()
            except apiclient.errors.HttpError as error:
                raise Exception(error % 'Atable_idn error occurred: %s')

        if self.ft_location_column and self.ft_latlng_column:
            url = self.ft_put_body(table_id, target_file)
        else:
            url = self.ft_put_body(table_id, self.source_file)

        if self.permission is not None:
                pass_action = {
                    "name":"insert",
                    "param":self.permission}

                perm = GDPerm(table_id, pass_action)
                result = perm.run()
                logger.debug(result)

        ft_url = "https://www.google.com/fusiontables/data?docid=%s" % table_id

        return service_response
dataset/ETHPy150Open tienfuc/gdcmdtools/gdcmdtools/put.py/GDPut.ft_put/swapped operands of `%`