Skip to content

Commit 6d7eebf

Browse files
Update DBFXLStools2.py
Added meaningful error message when DBFXLStools2 is attempted to be used in Python 64-bit, which it does not currently support.
1 parent 76e696f commit 6d7eebf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

CBToolsInstallDir/codebasetools/DBFXLStools2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,12 @@
3333
import copy
3434
from time import time
3535
import os
36+
import sys
3637
import tempfile
3738
import random
3839
from CodeBaseTools import VFPFIELD, cbTools, isstr, FORCEEXT, JUSTSTEM
40+
if "64 bit" in sys.version:
41+
raise ImportError("CodeBase XLSX services are NOT IMPLEMENTED in 64-bit Python!")
3942
from ExcelTools import *
4043
allChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
4144
passChars = "ABCDEFHJKLMNPQRSTUVWXYZ23456789"
@@ -122,6 +125,7 @@ def __init__(self, oVFP=None):
122125
self.bXLSXmode = False # XLS files are faster to output.
123126
self.name = "DBF to XLS Engine"
124127

128+
125129
def __enter__(self):
126130
if self.dbfmgr is None:
127131
self.dbfmgr = cbTools()

0 commit comments

Comments
 (0)