File tree Expand file tree Collapse file tree 1 file changed +19
-15
lines changed Expand file tree Collapse file tree 1 file changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -206,21 +206,25 @@ class Default:
206206}
207207# If numpy is available, add more types
208208if np :
209- COLUMN_TYPE_MAPPING .update (
210- {
211- np .int8 : "INTEGER" ,
212- np .int16 : "INTEGER" ,
213- np .int32 : "INTEGER" ,
214- np .int64 : "INTEGER" ,
215- np .uint8 : "INTEGER" ,
216- np .uint16 : "INTEGER" ,
217- np .uint32 : "INTEGER" ,
218- np .uint64 : "INTEGER" ,
219- np .float16 : "FLOAT" ,
220- np .float32 : "FLOAT" ,
221- np .float64 : "FLOAT" ,
222- }
223- )
209+ try :
210+ COLUMN_TYPE_MAPPING .update (
211+ {
212+ np .int8 : "INTEGER" ,
213+ np .int16 : "INTEGER" ,
214+ np .int32 : "INTEGER" ,
215+ np .int64 : "INTEGER" ,
216+ np .uint8 : "INTEGER" ,
217+ np .uint16 : "INTEGER" ,
218+ np .uint32 : "INTEGER" ,
219+ np .uint64 : "INTEGER" ,
220+ np .float16 : "FLOAT" ,
221+ np .float32 : "FLOAT" ,
222+ np .float64 : "FLOAT" ,
223+ }
224+ )
225+ except AttributeError :
226+ # https://github.com/simonw/sqlite-utils/issues/632
227+ pass
224228
225229# If pandas is available, add more types
226230if pd :
You can’t perform that action at this time.
0 commit comments