Skip to content

Commit

Permalink
* update
Browse files Browse the repository at this point in the history
  • Loading branch information
Ratchet committed Oct 3, 2023
1 parent f4e7bd0 commit 3f14f1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ jobs:
run: |
# compile the nimlite
nim c ${{ env.NIMC_FLAGS }} --tlsEmulation:off --passL:-static --out:${{ env.NIMLITE_DIR }}/${{ env.NIM_PACKAGE_NAME }}.pyd ${{ env.NIMLITE_DIR }}/${{ env.NIM_PACKAGE_NAME }}.nim
# # Windows build just doesn't work for whatever reason as it can't seem to import the nimlite.pyd file
# # check if compiled successfully
# Windows build just doesn't work for whatever reason as it can't seem to import the nimlite.pyd file
# check if compiled successfully
python -c "print(__import__('${{ env.TABLITE_PACKAGE_NAME }}.${{ env.NIM_PACKAGE_NAME }}').__file__)"
- name: Lint with flake8
run: |
Expand Down
7 changes: 5 additions & 2 deletions tablite/import_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -835,8 +835,11 @@ def text_reader(*args, **kwargs):
try:
return text_reader_nim(*args, **kwargs)
except Exception as e:
from traceback import format_exc
logging.error(f"Nimlite text_reader failed: {e}\n{format_exc()}")
if "pytest" in sys.modules:
raise e # ensure that fallback is only used during production
else:
from traceback import format_exc
logging.error(f"Nimlite text_reader failed: {e}\n{format_exc()}")

return text_reader_py(*args, **kwargs)

Expand Down

0 comments on commit 3f14f1c

Please sign in to comment.