Skip to content

Commit

Permalink
Downgrade count lines error to warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdbeek committed May 20, 2024
1 parent ab56ee1 commit 5f45575
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/galaxy/datatypes/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,7 +1049,7 @@ def estimate_file_lines(self, dataset: DatasetProtocol) -> Optional[int]:
sample_lines = dataset_read.count("\n")
return int(sample_lines * (float(dataset.get_size()) / float(sample_size)))
except UnicodeDecodeError:
log.error(f"Unable to estimate lines in file {dataset.get_file_name()}")
log.warning(f"Unable to estimate lines in file {dataset.get_file_name()}, likely not a text file.")
return None

def count_data_lines(self, dataset: HasFileName) -> Optional[int]:
Expand All @@ -1069,7 +1069,7 @@ def count_data_lines(self, dataset: HasFileName) -> Optional[int]:
if line and not line.startswith("#"):
data_lines += 1
except UnicodeDecodeError:
log.error(f"Unable to count lines in file {dataset.get_file_name()}")
log.warning(f"Unable to count lines in file {dataset.get_file_name()}, likely not a text file.")
return None
return data_lines

Expand Down

0 comments on commit 5f45575

Please sign in to comment.