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:
206
206
}
207
207
# If numpy is available, add more types
208
208
if 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
224
228
225
229
# If pandas is available, add more types
226
230
if pd :
You can’t perform that action at this time.
0 commit comments