Skip to content

Commit

Permalink
fixed missing relative imports in SQLarray_fromfile()
Browse files Browse the repository at this point in the history
  • Loading branch information
orbeckst committed Nov 10, 2015
1 parent 6621e13 commit 5c65b7a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions recsql/sqlarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"""
from __future__ import absolute_import

import sys
import os.path
import warnings
import re
Expand All @@ -45,6 +46,8 @@
import numpy

from .sqlutil import adapt_numpyarray, convert_numpyarray, adapt_object, convert_object
from . import csv_table
from . import rest_table
from .rest_table import Table2array
from .convert import irecarray_to_py

Expand Down Expand Up @@ -224,8 +227,7 @@ def __init__(self, name=None, records=None, filename=None, columns=None,
try:
# fall back: convert each record to pytypes
self.cursor.executemany(SQL,irecarray_to_py(records))
except Exception,err2:
import sys
except Exception, err2:
sys.stderr.write(str(err2))
sys.stderr.write("ERROR: You are probably feeding a recarray; sqlite does not know how to \n"
" deal with special numpy types such as int32 or int64. Try using the \n"
Expand Down Expand Up @@ -715,7 +717,6 @@ def SQLarray_fromfile(filename, **kwargs):
:class:`recsql.rest_table.Table2array` such as *mode* or
*autoncovert*.
"""
import rest_table, csv_table

Table2array = {'rst': rest_table.Table2array,
'txt': rest_table.Table2array,
Expand Down

0 comments on commit 5c65b7a

Please sign in to comment.