Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions bcpandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@
run(["bcp", "-v"], stdout=DEVNULL, stderr=DEVNULL, stdin=DEVNULL)
except FileNotFoundError:
warnings.warn("BCP utility not installed or not found in PATH, bcpandas will not work!")
except PermissionError:
warnings.warn(
"BCP utility not found due to permission issues, consider supplying path to bcp or bcpandas will not work!"
)
except Exception as e:
warnings.warn(f"An unhandled error occurred while checking for BCP utility: {e}")

del run, DEVNULL, warnings

Expand Down