simonw/sqlite-utils

Misleading progress bar against utf-16-le CSV input

开放

#439 创建于 2022年5月27日

 (12 条评论) (0 个反应) (0 位负责人)Python (145 个派生)github user discovery
bughelp wanted

仓库指标

星标
 (2,065 个星标)
PR 合并指标
 (平均合并 9小时 52分钟) (30 天内合并 7 个 PR)

描述

The program crashes without any error.

wget "https://artsdatabanken.no/Fab2018/api/export/csv"
sqlite-utils create-database test.db
sqlite-utils insert --csv --delimiter ";" --encoding "utf-16-le" test test.db csv 
  [------------------------------------]    0%
  [#################-------------------]   49%  00:00:01

I would like to highlight various issues:

  1. sqlite-utils catches exceptions without printing the stacktrace and/or reraising the exception, so there is no easy way to use pdb or similar to debug the program, solution: add a debug option
  2. Silent crash: this is related to (1.), and it happens when there is a catch-all mechanism; solution: let the program fail.

贡献者指南